Skip to content

[Gecko Bug 1935434] Implement forgiving parsing for trusted-types CSP directive.#51691

Merged
moz-wptsync-bot merged 1 commit into
masterfrom
gecko/1935434
Mar 31, 2025
Merged

[Gecko Bug 1935434] Implement forgiving parsing for trusted-types CSP directive.#51691
moz-wptsync-bot merged 1 commit into
masterfrom
gecko/1935434

Conversation

@moz-wptsync-bot
Copy link
Copy Markdown
Collaborator

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: 3a01a7335e0b5b05b49cbda19324a9b8a06ab315
gecko-reviewers: smaug

Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

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: f27925f3d6f792efb037cdb55bb98b972c11c1c6
gecko-reviewers: smaug
@moz-wptsync-bot moz-wptsync-bot merged commit 1c543cd into master Mar 31, 2025
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1935434 branch March 31, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants