-
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
feat: CSP enhancements #5516
feat: CSP enhancements #5516
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a great PR! Per our recent semver conversation: would this be best held for 4.2? I know the Kint changes were already merged...
I added a few questions. I'm abashedly not very up on CSP. I will read up on it a bit but would also appreciate if someone with better security mindset took a look. @lonnieezell maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like these changes a lot and don't see any security concerns with it.
ae7d4a3
to
d9c8608
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very impressive test-fu.
I will add the documentation. |
Added the documentation. Review, please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good examples in the docs. A couple wording suggestions. Also, please mention this as a new feature in the changelog/upgrade guides so we don't need to go back and add it.
Added changelogs/v4.2.0. |
Let's hold this for 4.2 |
ContentSecurityPolicy will be needed out of Response.
Outputting multiple nonces do not improve security. One is enough.
It is called in CIUnitTestCase::setUp() via $setUpMethods.
Co-authored-by: MGatner <mgatner@icloud.com>
Co-authored-by: MGatner <mgatner@icloud.com>
Co-authored-by: MGatner <mgatner@icloud.com>
Description
csp_style_nonce()
andcsp_script_nonce()
to get nonce attributescsp_style_nonce
andcsp_script_nonce
plugin for View ParserServices::csp()
Checklist: