Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove minified code blob #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

leMaik
Copy link

@leMaik leMaik commented Jun 19, 2022

TL;DR If you want to get rid of the minified code blob, use @lemaik/qrcode-svg


Especially in a server application, running a blob of mangled JavaScript might scare some people (especially since recent npm package malware incidents), eg. this resolves #26

Following my observations in #26 (comment), I restored the proper code by performing these steps:

  1. Pretty-print the code so that the following diffs make sense (either trust me or run prettier yourself to get the same result)
  2. Replace the now pretty-printed blob with the latest version from jeromeetienne/jquery-qrcode, and pretty-printed it again.
    Notably, this version contains Autodetect the optimal typeNumber if < 1 kazuhikoarase/qrcode-generator#41 and thus can determine the type automatically
  3. Restore the utf8 fix that was previously in this version, ie. apply davidshimjs/qrcodejs@8247821
  4. Remove the type detection that got added in step 2, because that's implemented already here

@VanessaHenderson
Copy link

@papnkukn has this project been abandoned? Is there anychance you can merge this PR to remove the obfuscated code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What's with the obfuscated code?
2 participants