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

style-src CSP errors in 3.13.5 #1647

Open
jamiethorpe opened this issue Sep 4, 2024 · 1 comment
Open

style-src CSP errors in 3.13.5 #1647

jamiethorpe opened this issue Sep 4, 2024 · 1 comment

Comments

@jamiethorpe
Copy link

This may be a regression coming from the base php debugbar package.

To replicate, add 'self' and a nonce to style-src in your Content-Security-Policy. Then add the nonce to debugbar:

if (app()->bound('debugbar')) {
    $debugbar = app(LaravelDebugbar::class);
    $renderer = $debugbar->getJavascriptRenderer();
    $renderer->setCspNonce(app('csp-nonce'));
}

You should see an error related to style-src upon loading any page with debugbar present.

This issue is not present in 3.12.2.

@parallels999
Copy link
Contributor

Feel free to make a PR with the fix 👍

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