Closed Bug 1633851 Opened 5 months ago Closed 4 months ago

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

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla78
Fission Milestone M6a
Tracking Status
firefox78 --- fixed

People

(Reporter: timhuang, Assigned: timhuang)

References

Details

Attachments

(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 tihuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6e725d8d275c
Part 1: Add a 'IsThirdPartyContextToTopWindow' flag to LoadInfo. r=baku
https://hg.mozilla.org/integration/autoland/rev/aa5fe5344e64
Part 2: Moving GetTopWindowExcludingExtensionAccessibleContentFrames() to AntiTrackingUtils. r=baku
https://hg.mozilla.org/integration/autoland/rev/46073712f17e
Part 3: Compute the IsThirdPartyContextToTopWindow flag in LoadInfo when opening the channel. r=baku
https://hg.mozilla.org/integration/autoland/rev/9b070149d2ee
Part 4: Introduce AntiTrakcingUtils::IsThirdPartyChannel, AntiTrackingUtils::IsThirdPartyWindow(). r=baku
https://hg.mozilla.org/integration/autoland/rev/ecbd52188ae8
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.