[COOP] Fix noopener not being applied to same-origin-plus-coep cases #27759
Conversation
The review process for this patch is being conducted in the Chromium project. |
7fd129c
to
5ed91ca
6ff61f0
to
8d41416
COOP requires that when a frame opens a popup, if that frame is cross-origin with its top frame, and its top frame COOP value is same-origin, that popup should be opened with noopener. This fixes the case where we have COOP: same-origin plus COEP: require-corp, in which case COOP.value will be same-origin-plus-coep. This fix also corrects the sandbox crash reported initially in the linked bug. Indeed sandboxed iframes have an opaque origin, and are therefore cross origin with their top frame. Applying noopener ensures the initial empty document is not cross origin isolated, which was the root cause of the crash (before this, the initial empty document had coop:unsafe-none, but was cross origin isolated) Bug: 1181673 Fixed: 1181673 Change-Id: Iaef658778ac25da0c84763b6115ff40c105e618a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2712945 Commit-Queue: Pâris Meuleman <pmeuleman@chromium.org> Auto-Submit: Pâris Meuleman <pmeuleman@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Hemery <ahemery@chromium.org> Cr-Commit-Position: refs/heads/master@{#858605}
8d41416
to
fee14c0
e8b8eeb
into
master
24 checks passed
24 checks passed
Azure Pipelines (affected tests without changes: Safari Technology Preview)
affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview)
affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests)
wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes)
wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
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.
COOP requires that when a frame opens a popup, if that frame is
cross-origin with its top frame, and its top frame COOP value is
same-origin, that popup should be opened with noopener.
This fixes the case where we have COOP: same-origin plus COEP:
require-corp, in which case COOP.value will be same-origin-plus-coep.
This fix also corrects the sandbox crash reported initially in the
linked bug.
Indeed sandboxed iframes have an opaque origin, and are therefore cross
origin with their top frame. Applying noopener ensures the initial empty
document is not cross origin isolated, which was the root cause of the
crash (before this, the initial empty document had coop:unsafe-none, but
was cross origin isolated)
Bug: 1181673
Fixed: 1181673
Change-Id: Iaef658778ac25da0c84763b6115ff40c105e618a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2712945
Commit-Queue: Pâris Meuleman <pmeuleman@chromium.org>
Auto-Submit: Pâris Meuleman <pmeuleman@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Arthur Hemery <ahemery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#858605}