[Trusted Types / CSP] Make 'allow-duplicate' parsing case-insensitive. #57079
+43
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The trusted-types CSP policy knows two keywords, 'allow-duplicates' and
'none'. Both are presently parsed case-sensitive. But CSP 3 normatively
references RFC 5234, which states that CSP keywords should be read case-
insensitively. (I.e., 'ALLOW-DUPLICATES' would also work.) This matches
WebKit's behaviour, and also Chrome's behaviour for other CSP keywords.
Bug: 472892238
Change-Id: I3877b16e672787611498950edb5c7fc2ea3d63c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7378832
Reviewed-by: Mike West <[email protected]>
Commit-Queue: Daniel Vogelheim <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1566827}