Closed Bug 1633851 Opened 5 months ago Closed 4 months ago

The nsContentUtils::IsThirdPartyWindowOrChannel could get a wrong result in Fission


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




Fission Milestone M6a
Tracking Status
firefox78 --- fixed


(Reporter: timhuang, Assigned: timhuang)




(5 files)

The nsContentUtils::IsThirdPartyWindowOrChannel() will return a wrong value if we give a channel and its URI to this function. The reason is that we would get a wrong top-level URI from the channel in Fission. It would only get the in-process top-level URI.

Blocks: 1633340

We plan to add a new flag in loadInfo to indicate whether the channel is a third party with respect to the top-level window. This flag would be computed in the parent process when the channel is opened. And use this flag in the nsContentUtils::IsThirdPartyWindowOrChannel() to check if the channel is a third-party to the top-level window.

The reason for adding this flag is that we cannot really get the correct top-level URI in the content process in Fission mode when the top-level is cross-origin. We can only get this information in the parent process and pass it to the content process in a manner that doesn't expose origin to a third-party context, i.e. a flag.

We add a 'IsThirdPartyContextToTopWindow' flag in the LoadInfo. This
flag shows if the channel is considered as a third party related to the
top-level window.

This flag would be set when opening the channel in the parent process.

Severity: -- → normal
Fission Milestone: --- → M6a
Attachment #9144573 - Attachment description: Bug 1633851 - Part 4: Change nsContentUtils::IsThirdPartyWindowOrChannel() to use the 'IsThirdPartyContextToTopWindow' flag for the channel check. r?baku! → Bug 1633851 - Part 4: Introduce AntiTrakcingUtils::IsThirdPartyChannel, AntiTrackingUtils::IsThirdPartyWindow(). r?baku!
Pushed by
Part 1: Add a 'IsThirdPartyContextToTopWindow' flag to LoadInfo. r=baku
Part 2: Moving GetTopWindowExcludingExtensionAccessibleContentFrames() to AntiTrackingUtils. r=baku
Part 3: Compute the IsThirdPartyContextToTopWindow flag in LoadInfo when opening the channel. r=baku
Part 4: Introduce AntiTrakcingUtils::IsThirdPartyChannel, AntiTrackingUtils::IsThirdPartyWindow(). r=baku
Part 5: Use AntiTrackingUtils::IsThirdPartyWindow/Channel() in ContentBlocking.cpp. r=baku
Blocks: 1637739
You need to log in before you can comment on or make changes to this bug.