-
Notifications
You must be signed in to change notification settings - Fork 154
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
SameSite cookies: Cross-site top-level navigation followed by redirect back to the first party #889
Comments
I'd like to weigh in on resolving this issue since the browser implementations have diverged. Following the A=>B->A example, the Chrome/Chromium test cases (implemented by @chlily1, exported to web-platform-tests) assume both A's are "strictly same-site." (See On the Safari/WebKit side, the test cases assume both A's are not strict. (See FYI, A simple demo page to test with is available at https://brass-tremendous-marmoset.glitch.me. |
There are actually three conditions for which we'd want to consider these types of redirects:
In all of these cases the redirect from B.com is attacker controlled, and thus the request to A.com should not be considered strictly same-site. I filed #1348 to remedy this in the spec. This roughly aligns with Firefox's implementation, though I'll note that we have a bug for embedded iframes where document.cookie will have access to same-site=strict cookies when the request for the embedded iframe is considered cross-site due to a cross-site redirect. If we can align on this, I'm happy to flip the expected values in the various wpts that currently expect same-site=strict access after cross-site redirects. e.g., the two tests that Firefox fails here: https://wpt.fyi/results/cookies/samesite/img.https.html?run_id=5692294122438656&run_id=5715442855313408&run_id=5742652110667776&run_id=5740336754196480. cc/ @chlily1 @miketaylr |
Closing since PR landed |
(Notation: => is a navigation, -> is a redirect, "A" is the first party site which has SameSite cookies set on it.)
Currently, top-level A=>B->A results in sending both Strict and Lax cookies on the redirect back to A, as reflected in this WPT testcase: https://github.com/web-platform-tests/wpt/blob/master/cookies/samesite/form-get-blank.html#L58
This should ideally send Lax (but not Strict) cookies, because the analogous top-level navigation scenario A=>B=>A would result in sending only Lax but not Strict cookies to A on the last navigation.
The text was updated successfully, but these errors were encountered: