Commit 72897d8
Implement forgiving parsing for trusted-types CSP directive.
Currently, we just discard the whole directive if an invalid token is
found. With this patch, we instead ignore such a token. Also improves
tests in should-trusted-type-policy-creation-be-blocked-by-csp-002.html
so that we really check that the original trusted-types directive is
preserved after serialization.
See w3c/webappsec-csp#363 (comment)
Differential Revision: https://phabricator.services.mozilla.com/D243358
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1935434
gecko-commit: d53513a85e737b493725ebe39e0454306b250b5c
gecko-reviewers: smaug1 parent efce5c7 commit 72897d8
File tree
1 file changed
+4
-0
lines changed- trusted-types
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
0 commit comments