Repository navigation
Remove redundant TrustedScript data checks from CSP algorithm - #818
Merged
Merged
Conversation
Member
Author
|
I'm a student in Igalia's Coding Experience program. Igalia is a W3C member. Can you help with the IPR check? |
nicolo-ribaudo
approved these changes
Aug 3, 2026
nicolo-ribaudo
left a comment
Member
There was a problem hiding this comment.
The spec change looks correct, other than some minor style comments. I'll see what to do about the IPR check.
antosart
reviewed
Aug 3, 2026
Lochipi
force-pushed
the
remove-redundant-trusted-types-checks
branch
from
August 3, 2026 18:40
757fa8c to
47011be
Compare
Member
Author
|
thanks for the review @antosart @nicolo-ribaudo |
Member
|
@lukewarlow would you mind doublechecking this? |
lukewarlow
reviewed
Aug 6, 2026
lukewarlow
approved these changes
Aug 6, 2026
lukewarlow
reviewed
Aug 6, 2026
mikewest
approved these changes
Aug 6, 2026
mikewest
left a comment
Member
There was a problem hiding this comment.
LGTM, modulo @lukewarlow's comments which seem accurate to me.
Lochipi
force-pushed
the
remove-redundant-trusted-types-checks
branch
from
August 7, 2026 15:59
47011be to
3731c15
Compare
Member
|
This should be ready now? :) |
antosart
approved these changes
Aug 13, 2026
Member
Indeed. Thanks for the ping! |
github-actions Bot
added a commit
that referenced
this pull request
Aug 13, 2026
SHA: e81d712 Reason: push, by antosart Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
HostGetCodeForEval extracts the internal [[Data]] from TrustedScript
objects before HostEnsureCanCompileStrings invokes the CSP algorithm.
So, by the time EnsureCSPDoesNotBlockStringCompilation receives bodyArg
and parameterArgs, they are already plain strings.
These checks are now redundant since the comparison of
parameterStrings[index] and bodyString against the TrustedScript
objects' data, and the verification that arguments implement
TrustedScript, are already done by HostGetCodeForEval.
see:
https://html.spec.whatwg.org/#hostgetcodeforeval(argument)
https://html.spec.whatwg.org/#hostensurecancompilestrings(realm,-parameterstrings,-bodystring,-codestring,-compilationtype,-parameterargs,-bodyarg)
https://www.w3.org/TR/CSP3/#can-compile-strings
Preview | Diff