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

Alternate take for script enforcement. #236

Merged
merged 3 commits into from
Nov 20, 2019
Merged

Conversation

koto
Copy link
Member

@koto koto commented Nov 8, 2019

Re: whatwg/dom#789 and whatwg/html#3052

As proposed by @annevk, add slots for script URL / text, populate them
when calling sink functions, and verify them when a script is prepared,
optionally running a default policy on a value read from the DOM if
it's different than the slot value.

It avoids integration points with DOM mutation algorithms, but we still
need to support script.setAttribute('src'), which is missing here.

spec/index.bs Outdated Show resolved Hide resolved
@koto koto marked this pull request as ready for review November 20, 2019 15:56
…#3052

As proposed by @annevk, add slots for script URL / text, populate them
when calling sink functions, and verify them when a script is prepared,
optionally running a default policy on a value read from the DOM if
it's different than the slot value.

It avoids integration points with DOM mutation algorithms, but we still
need to support script.setAttribute('src').
@koto
Copy link
Member Author

koto commented Nov 20, 2019

Merging - this is for scripts only, and does not resolve other elements or setting content attributes yet.

@koto koto merged commit d24c6e3 into w3c:master Nov 20, 2019
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 25, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 27, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 27, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 28, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 29, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 2, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 3, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 5, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 5, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 5, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1924523
Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723017}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 9, 2019
This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 11, 2019
…andling for Trusted Types., a=testonly

Automatic update from web-platform-tests
[Trusted Types] Implement new <script> handling for Trusted Types.

This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644

--

wpt-commits: d1e31101085c0ce2563ec39c0315ef84d8d2562a
wpt-pr: 20430
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 12, 2019
…andling for Trusted Types., a=testonly

Automatic update from web-platform-tests
[Trusted Types] Implement new <script> handling for Trusted Types.

This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644

--

wpt-commits: d1e31101085c0ce2563ec39c0315ef84d8d2562a
wpt-pr: 20430

UltraBlame original commit: 55acee2cb32bef02a8b5b10bc95b364f85e82911
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 12, 2019
…andling for Trusted Types., a=testonly

Automatic update from web-platform-tests
[Trusted Types] Implement new <script> handling for Trusted Types.

This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644

--

wpt-commits: d1e31101085c0ce2563ec39c0315ef84d8d2562a
wpt-pr: 20430

UltraBlame original commit: 55acee2cb32bef02a8b5b10bc95b364f85e82911
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Dec 12, 2019
…andling for Trusted Types., a=testonly

Automatic update from web-platform-tests
[Trusted Types] Implement new <script> handling for Trusted Types.

This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644

--

wpt-commits: d1e31101085c0ce2563ec39c0315ef84d8d2562a
wpt-pr: 20430

UltraBlame original commit: 55acee2cb32bef02a8b5b10bc95b364f85e82911
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Dec 16, 2019
…andling for Trusted Types., a=testonly

Automatic update from web-platform-tests
[Trusted Types] Implement new <script> handling for Trusted Types.

This follows the proposal at
w3c/trusted-types#236
and effectively reverts crrev.com/c/1547746. This replaces the
(arguably rather invasive) changes in node.cc and element.cc with
more elaborate logic in html_script_element.cc. (I.e., it pushes
complexity from the super-classes into a specific subclass, at the
expense of making the sub-class do more work.)

Bug: 1026549
Change-Id: I929e9e669db7f9e6b8de5a3d0d0df661f109b644

--

wpt-commits: d1e31101085c0ce2563ec39c0315ef84d8d2562a
wpt-pr: 20430
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

Successfully merging this pull request may close these issues.

2 participants