Skip to content
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

CSP syntax for require-trusted-types-for should be forgiving #580

Open
lukewarlow opened this issue Feb 24, 2025 · 1 comment
Open

CSP syntax for require-trusted-types-for should be forgiving #580

lukewarlow opened this issue Feb 24, 2025 · 1 comment

Comments

@lukewarlow
Copy link
Member

Currently the spec has an unforgiving syntax for require-trusted-types-for if you have an invalid sink group in your list it invalidates the whole directive. This isn't what's actually implemented in Chromium (or WebKit). The spec should instead have the value syntax as a space separated list and we simply discard values we don't recognise, this is how other CSP directives work and is better for forward compatibility.

fred-wang added a commit to web-platform-tests/wpt that referenced this issue Feb 24, 2025
@lukewarlow
Copy link
Member Author

I'm not sure this is actually an issue in the Trusted Types spec per se. More a CSP issue in general. Because all of them are defined by strict grammars but script-src for example will parse as forgiving in all browsers.

cc @fred-wang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant