-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 + DebugBar #1165
Comments
Are you using the latest version of the develop branch? I remember a patch came through not very long ago that set {csp_nonce} in the html for the toolbar which should have fixed that error. |
Unfortunately my version of /system/Debug/Toolbar/toolbarloader.js.php and /application/Filters/DebugToolbar.php are the same as here :(. |
your errors are "normal" and can be ignored because they doesnt effect your site at all. the latest toolbar changes should only allow use with csp protection enabled and development environment. |
Kint issue? out-of-scope for us? No further info in 3 months. |
I guess is hard to make a js file that does not use scripts inline and include them |
Hi there, I'm not an CSP expert.
I configured CSP with self and required domains (for script style and fonts) and everything was gr8 until DebugToolbar was turned on . Even if all of toolbar's tabs seams to work ok... there are errors in console:
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src”). Source: onclick attribute on A element. [only once]
Content Security Policy: The page’s settings blocked the loading of a resource at self (“style-src”). [repated when tab is changed]
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src”). [repated when tab is changed]
[nginx/php7.2/debian + ff / iridium]
... actually iridium (chrome) gave me more details:
?debugbar:49 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' https://maxcdn.bootstrapcdn.com/ https://use.fontawesome.com/ 'nonce-fd68498a9d2a9ea28cd45f26'". Either the 'unsafe-inline' keyword, a hash ('sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='), or a nonce ('nonce-...') is required to enable inline execution.
xhttp.onreadystatechange @ ?debugbar:49
I think problem is not with first html code which is generated by DebugToolbar but when it tried to apply additional scripts/styles.
The text was updated successfully, but these errors were encountered: