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.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

kahoot.js fix

Fixes one two critical bugs in kahoot.js-updated.

The bugs

The first

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.

The second

In another part of the code, there's an attempt to get the key quizQuestionAnswers from a different object. This key, shockingly, is also missing here! The last valid value or an empty array is also returned in this case.

License

This project is licensed under either of

at your option.

Keywords

FAQs

Package last updated on 15 May 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