Speculation-rules prefetch rejects same-site cross-origin URLs that the spec allows
Categories
(Core :: DOM: Networking, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: smayya, Assigned: smayya)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged][necko-priority-next])
Attachments
(1 external file)
PrefetchRecordParent::Init rejects every prefetch whose URL is cross-origin to the document while dom.speculation_rules.same_origin_only is set (the default). That also drops same-site cross-origin prefetches, for example from https://www.example.com/ to https://example.com/page.
The spec separates prefetches by network partition key, which is keyed by site, not origin. In "create navigation params by fetching" (https://wicg.github.io/nav-speculation/prefetch.html#create-navigation-params-by-fetching), a same-site cross-origin request shares the document's partition and needs none of the cross-site isolation (isolated partition key, cookie copying, IP anonymization). Only cross-site prefetches depend on the isolated partition, which Gecko doesn't implement yet.
Proposed fix: gate on the site instead of the origin (IsThirdPartyURI), and rename the pref to dom.speculation_rules.same_site_only to match.
Affected WPT:
- speculation-rules/prefetch/client-hints/redirect.https.sub.html, "Client Hints headers should be updated on redirects (drop)"
https://wpt.fyi/results/speculation-rules/prefetch/client-hints?label=master&label=experimental&aligned&q=redirect.https.sub.html
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
The spec separates prefetches by network partition key, so same-site
cross-origin prefetches share the document's partition and need none of the
cross-site isolation. Gate on the site instead of the origin, and rename
dom.speculation_rules.same_origin_only to dom.speculation_rules.same_site_only
accordingly.
Updated•1 month ago
|
Comment 4•22 days ago
|
||
| bugherder | ||
Updated•3 days ago
|
Description
•