Record a flag complementary to STATE_UNBLOCKED_UNSAFE_CONTENT to indicate that a channel was blocked by an actor external to URL Classifier
Categories
(Core :: Privacy: Anti-Tracking, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: nhnt11, Assigned: dimi)
References
Details
Attachments
(4 files)
Currently, when unblock() is called on a nsIUrlClassifierBlockedChannel, STATE_UNBLOCKED_UNSAFE_CONTENT is set as a content blocking flag. However, the way that unblock() is currently being used, the channel might still be "blocked" by another mechanism e.g. shimming.
What this means, is that actors calling unblock have no way to communicate to other actors (i.e. the protections panel UI), whether another form of blocking was done.
What we can do is allow the caller of unblock() to pass a boolean that indicates whether the resource will actually be blocked or not. And while we are doing it, maybe it would be good to rename "unblock" to something like "setBlockingOverride" or "captureBlocking" or "overrideBlocking" or something else along those lines.
Depending on the value of this new boolean, we would either set STATE_UNBLOCKED_UNSAFE_CONTENT or a new complementary flag like STATE_OTHER_BLOCKED_UNSAFE_CONTENT (or some other name - maybe we can rename STATE_UNBLOCKED_UNSAFE_CONTENT too if it helps to establish a pair of consistent names).
So finally:
- unblock() accepts true or false
- If true, set STATE_UNBLOCKED_UNSAFE_CONTENT, else set STATE_OTHER_BLOCKED_UNSAFE_CONTENT
- Rename unblock to something nicer
- Rename the state flags to something nicer
Dimi, Tom, what do you think? I think this is consistent with what we discussed last week. :)
Assignee | ||
Comment 1•4 years ago
|
||
(In reply to Nihanth Subramanya [:nhnt11] from comment #0)
Dimi, Tom, what do you think? I think this is consistent with what we discussed last week. :)
Yes, I think the idea is exactly what we discussed last week.
Assignee | ||
Comment 2•4 years ago
|
||
unsafe content is for Safe Browsing(phishing, malware, etc), we should use tracking content instead.
Assignee | ||
Comment 3•4 years ago
|
||
unsafe content is for phishing sites, we should use tracking content instead.
Depends on D93269
Assignee | ||
Comment 4•4 years ago
|
||
UI needs to distinguish the cases when a channel is shimmed and is
unshimmed.
When a channel is unshimmed, we unblock the channel and simply treat the channel as a
non-tracking channel.
When a channel is shimmed, although the channel is unblocked by
URLCLassifier, we still want to show it in the UI. For this case,
URLClassifier will notify a content blocking event when a channel is
unblocked.
This patch adds a new allow API, so the caller can use unblock() or
allow() depending upon the case it requires.
Depends on D93270
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D93271
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/98ea2a2e6e4e
https://hg.mozilla.org/mozilla-central/rev/a66138ae984b
https://hg.mozilla.org/mozilla-central/rev/9754af354ad7
https://hg.mozilla.org/mozilla-central/rev/acccd84e203f
Description
•