Closed Bug 1899570 Opened 1 year ago Closed 1 year ago

Investigate why test_same_site_cookies_redirect.html is broken with CHIPS enabled.

Categories

(Core :: Privacy: Anti-Tracking, task)

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: timhuang, Assigned: leander.schwarz)

References

Details

Attachments

(1 file)

The test test_same_site_cookies_redirect.html will hit the assertion that ensures the unpartitioned cookie principal has an empty partitionKey if we enable CHIPS. This only happens with the following two conditions both hold

  • Running xorigin tests where the pref privacy.partition.always_partition_third_party_non_cookie_storage is disabled
  • There is a storage access permission in place. This can be triggered by running test_nosniff_navigation.html before this test.

It looks like we access the Document::EffectiveStoragePrincipal() before the document gets the storage access flag from the document's channel. As a result, we will call Document::EffectiveCookiePrincipal() and cache the partitioned cookie principal. Then, the document will keep using the partitioned cookie principal even if the document get the storage access during WindowGlobalChild::OnNewDocument().

We need to figure out why Document::EffectiveStoragePrincipal() is called before the WindowContextChild sets the new document.

Assignee: nobody → lschwarz
Pushed by lschwarz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c82530c88fe7 Do not used cached cookie principal if NOT always partitioning thirdparty storage (on by default) to correctly gain StorageAcces OnNewDocument. r=bvandersloot
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: