Closed Bug 1473247 Opened Last year Closed Last year

Making the firstPartyDomain honors IP addresses

Categories

(Core :: DOM: Security, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: timhuang, Assigned: timhuang)

References

(Blocks 1 open bug)

Details

(Whiteboard: [domsecurity-active])

Attachments

(2 files)

The firstPartyDomain won't be set if the first party is an IP address when the first party isolation is enabled. It is because of the TLD service doesn't treat IP addresses as a valid base domain. We should fix this since an IP address should be considered as a valid first party domain.
Are other origin attributes honored with IP addresses? eg containers, PB mode?
Yes, they are. The firstPartyDomain is the only one exception right now.
Status: NEW → ASSIGNED
Right now, the firstPartyDomain won't be set when using IP addresses as
first party domains. It is because of that the TLD service won't accept
IP addresses as valid hosts. The patch fixes this problem by detecting
that if the host is a IP address. If it is, we will still set the
firstPartyDoamin with the IP address.
Comment on attachment 8990106 [details]
Bug 1473247 - Part 1: Fixing the issue that the IP addresses won't be set for first party domains. r=baku, arthuredelstein

Andrea Marchesini [:baku] has approved the revision.

https://phabricator.services.mozilla.com/D1977
Attachment #8990106 - Flags: review+
Comment on attachment 8990107 [details]
Bug 1473247 - Part 2: Add a test case for making sure that IP addresses can work properly for the firstPartyDomain. r=baku, arthuredelstein

Andrea Marchesini [:baku] has approved the revision.

https://phabricator.services.mozilla.com/D1978
Attachment #8990107 - Flags: review+
Hi Arthur,

Would you be able to review this? Or do you encounter any problem with registering a Phabricator account? If so, please let me know, I can find someone to help.
Flags: needinfo?(arthuredelstein)
Comment on attachment 8990106 [details]
Bug 1473247 - Part 1: Fixing the issue that the IP addresses won't be set for first party domains. r=baku, arthuredelstein

Arthur Edelstein (Tor Browser dev) [:arthuredelstein] has approved the revision.

https://phabricator.services.mozilla.com/D1977
Attachment #8990106 - Flags: review+
Comment on attachment 8990107 [details]
Bug 1473247 - Part 2: Add a test case for making sure that IP addresses can work properly for the firstPartyDomain. r=baku, arthuredelstein

Arthur Edelstein (Tor Browser dev) [:arthuredelstein] has approved the revision.

https://phabricator.services.mozilla.com/D1978
Attachment #8990107 - Flags: review+
Thanks and sorry for the delay!
Flags: needinfo?(arthuredelstein)
Pushed by tihuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/03e45d7472a0
Part 1: Fixing the issue that the IP addresses won't be set for first party domains. r=arthuredelstein,baku
Pushed by tihuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/01f390f36d95
Part 2: Add a test case for making sure that IP addresses can work properly for the firstPartyDomain. r=arthuredelstein,baku
https://hg.mozilla.org/mozilla-central/rev/03e45d7472a0
https://hg.mozilla.org/mozilla-central/rev/01f390f36d95
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
See Also: → 1534339
You need to log in before you can comment on or make changes to this bug.