| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Looks good to me!
A few small optional nits.
Sorry, something went wrong.
| expect(csp.value).to eq("trusted-types blahblahpolicy") | ||
| end | ||
|
|
||
| it "allows duplicate policy names in trusted-types directive" do |
There was a problem hiding this comment.
Would it make sense to test 'none' explicitly as well?
Sorry, something went wrong.
There was a problem hiding this comment.
yes, probably. I'll add that
Sorry, something went wrong.
Co-authored-by: Lucas Garron <lgarron@chromium.org>
| Back | FazBrowse Home | New Git URL |
All PRs:
Adding a new CSP directive
This PR adds support for the TrustedTypes CSP directives, require-trusted-types-for and 'trusted-types'.
Is the directive supported by any user agent? If so, which?
TrustedTypes are available in Chrome 83, Edge 83 and a polyfill exists for browsers that don't currently support.
What does it do?
require-trusted-types-for disallows using strings with DOM XSS injection sink functions (functions like Document.write, Element.InnerHtml), and requires matching types created by Trusted Type policies.
What are the valid values for the directive
require-trusted-types-for only allows script.
trusted-types allows a list of strings, including one 'allow-duplicates' which allows multiples of the same named policy to be created.