Closed Bug 2082099 Opened 1 month ago Closed 22 days ago

Speculation-rules prefetch rejects same-site cross-origin URLs that the spec allows

Categories

(Core :: DOM: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
162 Branch
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:

Assignee: nobody → smayya
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-next]

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.

Attachment #9661598 - Attachment description: WIP: Bug 2082099 - Only reject cross-site speculation-rules prefetches. r=#necko → Bug 2082099 - Only reject cross-site speculation-rules prefetches. r=#necko
Status: NEW → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
Regressions: 2091390
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: