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

getting error when content security policy is set for style-src and unsafe-inline not present. #51

Open
nirmalgupta opened this issue Oct 10, 2016 · 0 comments

Comments

@nirmalgupta
Copy link

This is a xss security issue caused by code at https://github.com/dwa012/html5-qrcode/blob/master/src/html5-qrcode.js#L19 . This can be fixed by replacing it by

var canvasElem = $('<canvas id="qr-canvas" width="' + (width - 2) + 'px" height="' + (height - 2) + 'px" style="display:none;"></canvas>').appendTo(currentElem);

Can you please update your code for the same?

For more information in content-security-policy, please visit https://content-security-policy.com/

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

No branches or pull requests

1 participant