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

Support for nonce in inline style tags to honor Content Security Policy header #1512

Closed
anupam-contaque opened this issue Dec 2, 2020 · 1 comment

Comments

@anupam-contaque
Copy link

anupam-contaque commented Dec 2, 2020

As mentioned in #418, gridstack relies on inline <style> tag to provide dynamic stylesheet.

Content Security Policy header blocks all inline-style, inline-script tags as it may impose XSS vulnerabilities.

Since, missing CSP header is identified as a critical XSS vulnerability, it would be better option to provide support for this rather than forcing users to use unsafe-inline source or removing CSP header from application.

One option is to pass server generated nonce during grid initialization which can be used as nonce attribute in inline <style> tags, that would prevent blocking of <style> tags generated by gridstack.

@adumesny
Copy link
Member

adumesny commented Dec 2, 2020

can you add you comments there instead ? I will re-open it.

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

2 participants