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

COOP: modify redirects handling #5739

Merged
merged 2 commits into from
Sep 10, 2020
Merged

Conversation

camillelamy
Copy link
Member

@camillelamy camillelamy commented Jul 17, 2020

This commit modifies the way we handle redirects with COOP. Instead of always
comparing a response to the current Document, we will compare it to the
previous redirect when enforcing COOP.

(See WHATWG Working Mode: Changes for more details.)


/browsing-the-web.html ( diff )
/origin.html ( diff )

@domenic
Copy link
Member

domenic commented Jul 17, 2020

It sounds like @annevk has the background here based on camillelamy/explainers#12, so I'll let him review.

Does this affect observable results? If so we'd want tests (although we could delay that until there's agreement on the approach).

@annevk
Copy link
Member

annevk commented Jul 20, 2020

Yeah, it does with same-origin-allow-popups (this ends up being stricter).

@annevk annevk added the needs tests Moving the issue forward requires someone to write tests label Jul 20, 2020
@domenic
Copy link
Member

domenic commented Jul 24, 2020

I want to make sure this isn't falling through the cracks... This needs a bit of rebasing, and tests, but probably @annevk could review it still to make sure it's the right approach. So, a gentle ping to both @camillelamy and @annevk :)

@camillelamy
Copy link
Member Author

I'm having some issue with my machine + bad internet connection that means I won't be able to write a test for this this week (hence the delay). I'm planning to have one next week to move this forward.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 3, 2020
This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 3, 2020
This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 3, 2020
This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Pâris Meuleman <[email protected]>
Auto-Submit: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#794090}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Aug 3, 2020
This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Pâris Meuleman <[email protected]>
Auto-Submit: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#794090}
stephenmcgruer pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 3, 2020
This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Pâris Meuleman <[email protected]>
Auto-Submit: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#794090}

Co-authored-by: Pâris MEULEMAN <[email protected]>
@camillelamy
Copy link
Member Author

I have added a test for the case that will change with this PR at web-platform-tests/wpt#24915.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 8, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Pâris Meuleman <[email protected]>
Auto-Submit: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#794090}

Co-authored-by: Pâris MEULEMAN <[email protected]>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854
@domenic domenic added the topic: cross-origin-opener-policy Issues and ideas around the new "inverse of rel=noopener" header label Aug 10, 2020
@domenic
Copy link
Member

domenic commented Aug 10, 2020

Excellent, thank you! Could you rebase on master?

@camillelamy
Copy link
Member Author

@domenic I have rebased on master, PTAL.

@domenic domenic removed the needs tests Moving the issue forward requires someone to write tests label Aug 12, 2020
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM; I pushed some minor editorial tweaks. I would appreciate if @annevk had time to look when he is back as well.

I also took the liberty of editing the original post here to restore the pull request template. All that remains is to file bugs on Gecko and WebKit, which we can do right before or after merging.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 13, 2020
This CL changes the handling of redirects in COOP to match
whatwg/html#5739. Instead of comparing a response to
the current document, we will compare it to the last entry in the redirect
chain.

Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 14, 2020
This CL changes the handling of redirects in COOP to match
whatwg/html#5739. Instead of comparing a
response to the current document, we will compare it to the last entry
in the redirect chain.

Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3
Bug: 1108292
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 14, 2020
This CL changes the handling of redirects in COOP to match
whatwg/html#5739. Instead of comparing a
response to the current document, we will compare it to the last entry
in the redirect chain.

Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3
Bug: 1108292
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339988
Commit-Queue: Camille Lamy <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#798083}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 14, 2020
This CL changes the handling of redirects in COOP to match
whatwg/html#5739. Instead of comparing a
response to the current document, we will compare it to the last entry
in the redirect chain.

Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3
Bug: 1108292
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339988
Commit-Queue: Camille Lamy <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#798083}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Aug 14, 2020
This CL changes the handling of redirects in COOP to match
whatwg/html#5739. Instead of comparing a
response to the current document, we will compare it to the last entry
in the redirect chain.

Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3
Bug: 1108292
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339988
Commit-Queue: Camille Lamy <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#798083}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 15, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Pâris Meuleman <[email protected]>
Auto-Submit: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#794090}

Co-authored-by: Pâris MEULEMAN <[email protected]>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Aug 16, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Commit-Queue: Pâris Meuleman <pmeulemanchromium.org>
Auto-Submit: Pâris Meuleman <pmeulemanchromium.org>
Cr-Commit-Position: refs/heads/master{#794090}

Co-authored-by: Pâris MEULEMAN <pmeulemanchromium.org>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854

UltraBlame original commit: 143d914013383261f9af6c0b99d08ad29c6602d0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Aug 16, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Commit-Queue: Pâris Meuleman <pmeulemanchromium.org>
Auto-Submit: Pâris Meuleman <pmeulemanchromium.org>
Cr-Commit-Position: refs/heads/master{#794090}

Co-authored-by: Pâris MEULEMAN <pmeulemanchromium.org>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854

UltraBlame original commit: 075d1a7becd6433ebfc6863069293bc5dca69041
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Aug 16, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Commit-Queue: Pâris Meuleman <pmeulemanchromium.org>
Auto-Submit: Pâris Meuleman <pmeulemanchromium.org>
Cr-Commit-Position: refs/heads/master{#794090}

Co-authored-by: Pâris MEULEMAN <pmeulemanchromium.org>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854

UltraBlame original commit: 143d914013383261f9af6c0b99d08ad29c6602d0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Aug 16, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Commit-Queue: Pâris Meuleman <pmeulemanchromium.org>
Auto-Submit: Pâris Meuleman <pmeulemanchromium.org>
Cr-Commit-Position: refs/heads/master{#794090}

Co-authored-by: Pâris MEULEMAN <pmeulemanchromium.org>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854

UltraBlame original commit: 075d1a7becd6433ebfc6863069293bc5dca69041
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Aug 16, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Commit-Queue: Pâris Meuleman <pmeulemanchromium.org>
Auto-Submit: Pâris Meuleman <pmeulemanchromium.org>
Cr-Commit-Position: refs/heads/master{#794090}

Co-authored-by: Pâris MEULEMAN <pmeulemanchromium.org>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854

UltraBlame original commit: 143d914013383261f9af6c0b99d08ad29c6602d0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Aug 16, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Commit-Queue: Pâris Meuleman <pmeulemanchromium.org>
Auto-Submit: Pâris Meuleman <pmeulemanchromium.org>
Cr-Commit-Position: refs/heads/master{#794090}

Co-authored-by: Pâris MEULEMAN <pmeulemanchromium.org>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854

UltraBlame original commit: 075d1a7becd6433ebfc6863069293bc5dca69041
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me too, modulo a minor nit.

<var>currentCOOPEnforcementResult</var>'s <span
data-x="coop-enforcement-coop">cross-origin opener policy</span>,
<var>currentCOOPEnforcementResult</var>'s <span
data-x="coop-enforcement-origin">origin</span>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to call this current origin or origin? The term used is not consistent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think just origin will be simpler. I have changed the name here and below.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 25, 2020
…stonly

Automatic update from web-platform-tests
COOP: change handling of redirects

This CL changes the handling of redirects in COOP to match
whatwg/html#5739. Instead of comparing a
response to the current document, we will compare it to the last entry
in the redirect chain.

Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3
Bug: 1108292
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339988
Commit-Queue: Camille Lamy <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#798083}

--

wpt-commits: ed42d5908c6008e054919281f893b7f5cecd5e75
wpt-pr: 24990
clamy and others added 2 commits September 9, 2020 15:04
This commit modifies the way we handle redirects with COOP. Instead of always
comparing a response to the current Document, we will compare it to the
previous redirect when enforcing COOP.

Editorial tweaks
@camillelamy
Copy link
Member Author

Thanks Anne and Domenic! Sorry for the delay, I have rebased the PR so I think it should be good to go.

@annevk annevk merged commit 7d852a3 into whatwg:master Sep 10, 2020
sidvishnoi pushed a commit to sidvishnoi/gecko-webmonetization that referenced this pull request Sep 23, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Pâris Meuleman <[email protected]>
Auto-Submit: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#794090}

Co-authored-by: Pâris MEULEMAN <[email protected]>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854
ambroff pushed a commit to ambroff/gecko that referenced this pull request Nov 4, 2020
Automatic update from web-platform-tests
COOP: add redirect WPT tests (#24854)

This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Pâris Meuleman <[email protected]>
Auto-Submit: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#794090}

Co-authored-by: Pâris MEULEMAN <[email protected]>
--

wpt-commits: ea967166620364b1598ef6dbabb7f75100e9472d
wpt-pr: 24854
ambroff pushed a commit to ambroff/gecko that referenced this pull request Nov 4, 2020
…stonly

Automatic update from web-platform-tests
COOP: change handling of redirects

This CL changes the handling of redirects in COOP to match
whatwg/html#5739. Instead of comparing a
response to the current document, we will compare it to the last entry
in the redirect chain.

Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3
Bug: 1108292
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339988
Commit-Queue: Camille Lamy <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#798083}

--

wpt-commits: ed42d5908c6008e054919281f893b7f5cecd5e75
wpt-pr: 24990
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
This CL adds a WPT test that checks the interaction of COOP
same-origin-allow-popups with redirects as specified in
whatwg/html#5739.

This follows up on Clamy@ work in https://crrev.com/2312796.

Change-Id: I4afede7221c2edeec675035339064c4a9ae7fb80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332260
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Pâris Meuleman <[email protected]>
Auto-Submit: Pâris Meuleman <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#794090}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d906c6267954c2787b269b6fdbaad17baa38a098
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
This CL changes the handling of redirects in COOP to match
whatwg/html#5739. Instead of comparing a
response to the current document, we will compare it to the last entry
in the redirect chain.

Change-Id: I73a3926a8827733974d7c08b7f3553da06435ac3
Bug: 1108292
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339988
Commit-Queue: Camille Lamy <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Reviewed-by: Pâris Meuleman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#798083}
GitOrigin-RevId: f338d7dc22470768bb78f1766e8816b15de30884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cross-origin-opener-policy Issues and ideas around the new "inverse of rel=noopener" header
Development

Successfully merging this pull request may close these issues.

3 participants