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

Script takes make CSP difficult to implement #906

Open
Zealth57 opened this issue Oct 5, 2024 · 0 comments
Open

Script takes make CSP difficult to implement #906

Zealth57 opened this issue Oct 5, 2024 · 0 comments

Comments

@Zealth57
Copy link

Zealth57 commented Oct 5, 2024

When implementing a strong CSP that excludes unsafe inline (using things like a nonce or hashes in the CSP) it blocks query monitor output. I'm not 100% sure how many places this affects but there are several places in the code that are echo '<script type="text/javascript">' . "\n\n";. If these were converted to using core methods like add_inline_script I believe that has filters / hooks that allow us to control the CSP and add a nonce. Or if there even was a filter on the script tag to add our own attributes that would be helpful. Happy to take a stab at a PR for this if you're open to that.

Repository owner deleted a comment Oct 25, 2024
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