Skip to content

Commit

Permalink
Remove the [SecureContext] restriction from Trusted Types.
Browse files Browse the repository at this point in the history
While it's reasonable to exclude new APIs from non-secure contexts, the
ancestry requirements allow attackers to disable restricted APIs from
embedded contexts. This is usually excellent, as it means that data
won't leak from secure to non-secure contexts. For security features,
on the other hand, this gives the attacker some advantage with regard
to embedded contexts' mitigtions.

This is unfortunate, and this patch removes the restriction to ensure
that embedded contexts can continue to mitigate the effect of XSS
attack by reverting https://crrev.com/c/2093214 and
https://crrev.com/c/2098076.

Bug: 1059554
Change-Id: Ib948437310509f1d29cacff1e6c74ab7cbc30d11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2195965
Commit-Queue: Mike West <mkwst@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#767894}
  • Loading branch information
mikewest authored and chromium-wpt-export-bot committed May 12, 2020
1 parent 14bbee9 commit 094353f
Show file tree
Hide file tree
Showing 88 changed files with 2 additions and 27 deletions.
4 changes: 2 additions & 2 deletions lint.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ SET TIMEOUT: service-workers/service-worker/resources/resource-timing-worker.js
SET TIMEOUT: shadow-dom/Document-prototype-currentScript.html
SET TIMEOUT: shadow-dom/scroll-to-the-fragment-in-shadow-tree.html
SET TIMEOUT: shadow-dom/slotchange-event.html
SET TIMEOUT: trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.https.html
SET TIMEOUT: trusted-types/DOMWindowTimers-setTimeout-setInterval.tentative.https.html
SET TIMEOUT: trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html
SET TIMEOUT: trusted-types/DOMWindowTimers-setTimeout-setInterval.tentative.html
SET TIMEOUT: user-timing/*
SET TIMEOUT: web-animations/timing-model/animations/*
SET TIMEOUT: webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 0 additions & 24 deletions trusted-types/nonsecure-require-trusted-types-for.tentative.html

This file was deleted.

This file was deleted.

File renamed without changes.

0 comments on commit 094353f

Please sign in to comment.