Closed Bug 1637194 Opened 9 months ago Closed 8 months ago

Store first-party domain in CookieJarSetting

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: dimi, Assigned: dimi)

References

Details

Attachments

(4 files, 1 obsolete file)

Currently dFPI doesn't work in Fission since storagePrincipal has a incorrect first-party domain.
It's because when we call StoragePrincipalHelper::ChooseOriginAttributes()[1] , it sets FPD through loadInfo's topLevelPrincipal, which is wrong in Fission because topLevelPrincipal is from the in-process top.

We are considering putting FPD in CookieJarSettings.

[1] https://searchfox.org/mozilla-central/rev/446160560bf32ebf4cb7c4e25d7386ee22667255/toolkit/components/antitracking/StoragePrincipalHelper.cpp#19

Priority: -- → P1

FirstPartyDomain is only set while loading a top-level document.
We added in nsHttpChannel::AsyncOpen to ensure that the value is updated
whenever we open a channel.

Depends on D75276

This fixes a issue that about:blank page can't get correct first-party
domain when fission is enabled.

Depends on D75783

Attachment #9149831 - Attachment is obsolete: true
Pushed by dlee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e7dfa75d822d
P1. Add firstPartyDomain to CookieJarSetting r=timhuang,baku
https://hg.mozilla.org/integration/autoland/rev/57be6fd91c48
P2. Set firstPartyDomain to CookieJarSetting in nsHttpChannel::AsyncOpen r=necko-reviewers,timhuang,baku,kershaw
https://hg.mozilla.org/integration/autoland/rev/bd808346ec6e
P3. StoragePrincipalHelper uses firstPartyDomain in CookieJarSetting r=timhuang,baku
https://hg.mozilla.org/integration/autoland/rev/643eb857ad96
P4. Inherit the first-party domain from the parent document when creating CookieJarSetting in document r=timhuang,baku
You need to log in before you can comment on or make changes to this bug.