Investigate whether tracking annotations take redirects into account

NEW
Unassigned

Status

()

enhancement
P3
normal
Last year
9 months ago

People

(Reporter: francois, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-triaged])

The channel classifier should consider redirects when tracking protection is disable and tracking annotations are enabled.

So for example, if example.com loads an iframe on tracker.com which redirects back to example.com, that load should still be flagged as a tracker since it went through a tracking domain.

When TP is enabled, this is not necessary since TP will cancel the channel and the redirect will never happen.

This is how same-site cookies walks through the redirect chain for its check:

https://dxr.mozilla.org/mozilla-central/rev/dfb15917c057f17e5143f7d7c6e1972ba53efc49/netwerk/base/nsNetUtil.cpp#2193-2209
Priority: -- → P3
Whiteboard: [necko-triaged]
Reporter

Updated

Last year
Blocks: antitracking
Reporter

Updated

Last year
Blocks: 1461921
No longer blocks: antitracking
baku, if you have free cycles, can you take a look at this?
For what I can say (regarding my knowledge of the HTTP redirect code) we don't carry "is a tracker" flag on redirected channels.  We simply run the annotation again on the new channel.

Note that it may not always be possible to annotate channels when we redirect to ftp:, javascript: or data: or any other schema that is allowed to redirect to.
(In reply to Honza Bambas (:mayhemer) from comment #2)
> Note that it may not always be possible to annotate channels when we
> redirect to ftp:, javascript: or data: or any other schema that is allowed
> to redirect to.

To make this more clear: there is no API on the general nsIChannel interface to say "this channel is a tracker".
Reporter

Comment 4

9 months ago
We also need to check the case when:

1. example.com loads a resource from example.net
2. example.net redirects to tracker.com

I just ran into problems in a test that was doing this and the resource did not appear to get annotated properly.
You need to log in before you can comment on or make changes to this bug.