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

CSP unsafe-eval conflict #237

Open
CarlSinclair opened this issue May 19, 2024 · 0 comments
Open

CSP unsafe-eval conflict #237

CarlSinclair opened this issue May 19, 2024 · 0 comments

Comments

@CarlSinclair
Copy link

The Content Security Policy (CSP) prevents the evaluation of arbitrary strings as JavaScript to make it more difficult for an attacker to inject unathorized code on your site.

To solve this issue, avoid using eval(), new Function(), setTimeout([string], ...) and setInterval([string], ...) for evaluating strings.

If you absolutely must: you can enable string evaluation by adding unsafe-eval as an allowed source in a script-src directive.

⚠️ Allowing string evaluation comes at the risk of inline script injection.

AFFECTED RESOURCES
1 directive
Source location | Directive | Status -- | -- | -- app.js?f6326a472a:16 | script-src | blocked

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