Skip to content

Commit 0a75a01

Browse files
cbiesingerchromium-wpt-export-bot
authored andcommitted
[FedCM] Test that we don't send SameSite=Lax cookies to accounts/id assertion
Bug: 329145816 Change-Id: I4ab779c48aa76c9c2c0205e78c5f1eec7c101d38 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5484967 Reviewed-by: Nicolás Peña <[email protected]> Auto-Submit: Christian Biesinger <[email protected]> Commit-Queue: Christian Biesinger <[email protected]> Cr-Commit-Position: refs/heads/main@{#1292125}
1 parent d47590a commit 0a75a01

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

credential-management/fedcm-same-site-none/fedcm-same-site-none.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
const cred = await fedcm_get_and_select_first_account(t, options);
2121
assert_equals(cred.token, "token");
2222
assert_equals(cred.isAutoSelected, false);
23-
}, "FedCM requests should be considered cross-origin and therefore not send SameSite=Strict cookies.");
23+
}, "FedCM requests should be considered cross-origin and therefore not send SameSite=Strict or Lax cookies.");
2424

2525
</script>

credential-management/support/fedcm/accounts_check_same_site_strict.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ def main(request, response):
77
return request_error
88
if request.cookies.get(b"same_site_strict") == b"1":
99
return (546, [], "Should not send SameSite=Strict cookies")
10+
if request.cookies.get(b"same_site_lax") == b"1":
11+
return (547, [], "Should not send SameSite=Lax cookies")
1012
if request.headers.get(b"Sec-Fetch-Site") != b"cross-site":
1113
return (538, [], "Wrong Sec-Fetch-Site header")
1214

credential-management/support/fedcm/token_check_same_site_strict.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ def main(request, response):
77
return request_error
88
if request.cookies.get(b"same_site_strict") == b"1":
99
return (546, [], "Should not send SameSite=Strict cookies")
10+
if request.cookies.get(b"same_site_lax") == b"1":
11+
return (547, [], "Should not send SameSite=Lax cookies")
1012

1113
response.headers.set(b"Content-Type", b"application/json")
1214
response.headers.set(b"Access-Control-Allow-Origin", request.headers.get(b"Origin"))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Content-Type: text/html
22
Set-Cookie: cookie=1; SameSite=None; Secure; Path=/
33
Set-Cookie: same_site_strict=1; SameSite=Strict; Secure; Path=/
4+
Set-Cookie: same_site_lax=1; SameSite=Lax; Secure; Path=/

0 commit comments

Comments
 (0)