Open Bug 1436186 Opened 7 years ago Updated 2 years ago

DocGroup::GetKey isn't precise enough

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

People

(Reporter: nika, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Currently it just uses nsIPrincipal::GetBaseDomain, when (I believe) it should also take the protocol and port into account.
Nika, could you please set a priority for this? (Without priority it shows up in triaging, and you'll get bugged by people like me. Sorry.)
Flags: needinfo?(nika)
This currently has no real impact, but it might in the future.
Flags: needinfo?(nika)
Priority: -- → P3
Component: DOM → DOM: Core & HTML

I think Principal should get a GetSite() method that follows https://html.spec.whatwg.org/#obtain-a-site and then we use that here. (Note that it usually would not take port into account which is correct as document.domain can unfortunately cross that boundary.)

The other thing here is that we should probably take origin attributes into account as well.

Type: enhancement → defect
Depends on: 1601594, 1628783
Blocks: 1630868

It seems this was fixed in bug 1601594, though there is still a comment there about GetBaseDomain: https://searchfox.org/mozilla-central/source/dom/base/DocGroup.cpp#154-166. The other slightly weird nomenclature there is "SiteOrigin". It would be nicer if we used Site here as well, similar to the refactoring from bug 1731739 comment 5.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.