Closed Bug 1476715 Opened 6 years ago Closed 6 years ago

Differentiate between firstparty/thirdparty or thirdparty tracking channels

Categories

(Firefox :: Protections UI, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: baku)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

The third part of bug 1476324 added an unintended regression that causes all features that use TP annotations on channels to be applied to first party contexts. Instead, it would be nice to fix things by removing the GetIsTrackingResource() getter from the channel interface and add two new ones, GetIsThirdPartyTrackingResource() and GetIsFirstPartyOrThirdPartyTrackingResource(). The latter method can do what GetIsTrackingResource() currently does and the former can check mozIThirdPartyUtils::IsThirdPartyChannel() additionally.
Status: NEW → ASSIGNED
Priority: -- → P1
I went through all the isTrackingResource and GetIsTrackingResource() calls and I don't see any valid reason to split this attribute in 2: isFirstPartyTrackingResource and isThirdPartyResource. Instead, we should probably add a 3rd party check here: https://searchfox.org/mozilla-central/rev/88199de427d3c5762b7f3c2a4860c10734abd867/netwerk/protocol/http/nsHttpChannel.cpp#573-574 and here: https://searchfox.org/mozilla-central/rev/88199de427d3c5762b7f3c2a4860c10734abd867/netwerk/protocol/http/nsHttpChannel.cpp#2182-2185 The non-anti-tracking-related call is in ScriptLoader, but this is not really a issue because a script cannot be a first party channel. I'm going to upload a patch that compiles to show that, this approach is probably not needed.
Flags: needinfo?(francois)
Attached patch tracking.patch (obsolete) — Splinter Review
(In reply to Andrea Marchesini [:baku] from comment #1) > The non-anti-tracking-related call is in ScriptLoader, but this is not > really a issue because a script cannot be a first party channel. I can also think of another existing user: https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/netwerk/base/nsChannelClassifier.cpp#1028-1030 https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/netwerk/base/nsChannelClassifier.cpp#238 and of a future one: Fastblock (bug 1474280).
Flags: needinfo?(francois)
Attached patch tracking2.patchSplinter Review
Attachment #8993355 - Attachment is obsolete: true
Attachment #8994768 - Flags: review?(francois)
Attachment #8994768 - Flags: review?(francois) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/cb8a7a9f4a73 low priority connection for 3rd party + tracking resource only, r=francois
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Depends on: 1482950
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: