From 1120ba99036f61a02a3cbca05dcd0b2c0c39fcc0 Mon Sep 17 00:00:00 2001 From: Kevin McNee Date: Tue, 6 Feb 2024 11:09:58 -0800 Subject: [PATCH] Don't reject same site prefetches with no-referrer The referring URL as computed by the referrer policy for the prefetch request was incorrectly being used to determine whether a prefetch was cross site. This value is only meant to be used for the prefetch request. The omission of the URL made it look like a cross site prefetch, so the cookie eligibility check was applied. We now use the initiating origin to determine whether a prefetch is cross site. Bug: 1524338 Change-Id: Id154effae55c539fff7cd733327fc9029c53b03a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5263133 Commit-Queue: Kevin McNee Reviewed-by: Liviu Tinta Cr-Commit-Position: refs/heads/main@{#1256905} --- .../prefetch/same-origin-cookies.https.html | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/speculation-rules/prefetch/same-origin-cookies.https.html b/speculation-rules/prefetch/same-origin-cookies.https.html index d97ee55d106e43..2f93c1ebb4f5ce 100644 --- a/speculation-rules/prefetch/same-origin-cookies.https.html +++ b/speculation-rules/prefetch/same-origin-cookies.https.html @@ -5,13 +5,19 @@ + + + + + +