Content classifier blocks first-party requests made from extension content scripts
Categories
(Core :: Privacy: Anti-Tracking, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: timhuang, Assigned: timhuang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
ContentClassifierRequest(nsIChannel*) marks the request valid before it derives the request host, the site and the third-party flag. Every failure after that point returns early and leaves the constructor defaults in place.
The problematic case is a loading principal without a base domain. A fetch from an extension content script carries an expanded principal, whose GetBaseDomain returns NS_ERROR_NOT_AVAILABLE, so the request is classified as third-party regardless of context. On a site that is on a tracker list, a content script's fetch to the page's own origin is blocked. This is undesirable.
| Assignee | ||
Comment 1•18 days ago
|
||
The channel constructor set mValid before deriving the host, site and
third-party flag, so any later early return handed the engine a request
built from the constructor defaults, where mThirdParty is true. A loading
principal without a base domain, such as the expanded principal of a
content-script fetch, took that path and got first-party requests to a
listed site blocked. Keep classifying those requests with an empty source
site, and set mValid last.
Updated•18 days ago
|
Comment 3•13 days ago
|
||
| bugherder | ||
Updated•6 days ago
|
Description
•