Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kahoot.js-fix

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kahoot.js-fix

Fixes a critical bug in kahoot.js-updated

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by350%
Maintainers
1
Weekly downloads
 
Created
Source

kahoot.js fix

Fixes a critical bug in kahoot.js-updated.

The bug

In the file src/modules/backup.js, kahoot.js tries to get an array from a property after parsing a response from the Kahoot API. However, this property doesn't always exist.

this.quiz.quizQuestionAnswers = recover.defaultQuizData.quizQuestionAnswers
//                                      ^^^^^^^^^^^^^^^
//                                    this might not exist

The value recover is retrieved via JSON.parse, so this library simply patches JSON.parse using a Proxy. If defaultQuizData doesn't exist, its last existant value is returned. If there is no last valid value, an empty array is returned.

License

This project is licensed under either of

at your option.

Keywords

FAQs

Package last updated on 30 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc