-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency: declarativeNetRequest rules able to block background requests from other extensions #369
Comments
The opposite is also worth considering. |
This topic was already discussed at the previous meeting (PR with meeting notes: #363), with vendor-specific issues tracked at https://crbug.com/1421697 (Chrome) and https://bugzil.la/1810753 (Firefox). The consensus is to not let extensions affect requests from other extensions. For reference, the notes from two weeks ago are: webextensions/_minutes/2023-03-16-wecg.md Lines 109 to 121 in 6183ce7
The above position was repeated in today's meeting notes (pending review to be merged at #371). |
There are a number of areas for consideration. Rule Contexts
For example, Problem Areas
|
@erosman : Rule contexts are important for me and they're also an area where there's a lot of inconsistency right now. Here's what I have observed when trying to use declarativeNetRequest to provide credentials for matching requests.
These results are produced with this dynamic rule:
I would expect to be able to modify headers of my own extension in the background service worker on all browsers, but unfortunately it doesn't seem possible right now, and it's not clear whether these inconsistencies are being tracked. |
At Ghostery, we have a similar issue with the problem (mentioned above). One of our users reported a broken page of another extension, which was blocked by our DNR rules. Everything except the DNR rules does not work (the extension does not receive any events from other extension pages, etc). Also, It is not possible to add a general allow rule to let requests get through. As the extensions do not have access to each other, DNR rules should not run for the |
For folks following along here, we merged a fix for this in Chromium last night. |
This comment has been minimized.
This comment has been minimized.
I have added "implemented: chrome" because the behavior was changed in #369 (comment) I am also changing "supportive: firefox" to "implemented: firefox", since Firefox has restricted extensions from affecting other extensions from the very beginning. |
A bug in the chrome.declarativeNetRequest API[1] meant that extensions could block requests initiated by other extensions. This cross-extension request blocking wasn't supposed to be possible[2], and led to lots of issues for users with multiple browser extensions installed (for example, see this Privacy Badger bug report[3]). These cross-extension requests weren't associated with a tabId, and so could not be differentiated from other such requests - including ServiceWorker initiated requests. As a workaround, to avoid breaking the other extensions our users might have installed, we stopped blocking any requests with no associated tabId. Since then, we have fixed the bug in Chrome[4], and that fix was release with Chrome 128. So let's re-enable ServiceWorker initiated request blocking again and increase the minimum supported Chrome version to 128. 1 - https://crbug.com/40896400 2 - w3c/webextensions#369 3 - EFForg/privacybadger#2968 4 - https://chromiumdash.appspot.com/commit/486d638e6977dad73bd207dc914df9319afac152
A bug in the chrome.declarativeNetRequest API[1] meant that extensions could block requests initiated by other extensions. This cross-extension request blocking wasn't supposed to be possible[2], and led to lots of issues for users with multiple browser extensions installed (for example, see this Privacy Badger bug report[3]). These cross-extension requests weren't associated with a tabId, and so could not be differentiated from other such requests - including ServiceWorker initiated requests. As a workaround, to avoid breaking the other extensions our users might have installed, we stopped blocking any requests with no associated tabId. Since then, we have fixed the bug in Chrome[4], and that fix was release with Chrome 128. So let's re-enable ServiceWorker initiated request blocking again and increase the minimum supported Chrome version to 128. 1 - https://crbug.com/40896400 2 - w3c/webextensions#369 3 - EFForg/privacybadger#2968 4 - https://chromiumdash.appspot.com/commit/486d638e6977dad73bd207dc914df9319afac152
A bug in the chrome.declarativeNetRequest API[1] meant that extensions could block requests initiated by other extensions. This cross-extension request blocking wasn't supposed to be possible[2], and led to lots of issues for users with multiple browser extensions installed (for example, see this Privacy Badger bug report[3]). These cross-extension requests weren't associated with a tabId, and so could not be differentiated from other such requests - including ServiceWorker initiated requests. As a workaround, to avoid breaking the other extensions our users might have installed, we stopped blocking any requests with no associated tabId. Since then, we have fixed the bug in Chrome[4], and that fix was release with Chrome 128. So let's increase the minimum supported Chrome version to 128, so that we can re-enable ServiceWorker initiated request blocking in the future. 1 - https://crbug.com/40896400 2 - w3c/webextensions#369 3 - EFForg/privacybadger#2968 4 - https://chromiumdash.appspot.com/commit/486d638e6977dad73bd207dc914df9319afac152
A bug in the chrome.declarativeNetRequest API[1] meant that extensions could block requests initiated by other extensions. This cross-extension request blocking wasn't supposed to be possible[2], and led to lots of issues for users with multiple browser extensions installed (for example, see this Privacy Badger bug report[3]). These cross-extension requests weren't associated with a tabId, and so could not be differentiated from other such requests - including ServiceWorker initiated requests. As a workaround, to avoid breaking the other extensions our users might have installed, we stopped blocking any requests with no associated tabId. Since then, we have fixed the bug in Chrome[4], and that fix was release with Chrome 128. So let's increase the minimum supported Chrome version to 128, so that we can re-enable ServiceWorker initiated request blocking in the future. 1 - https://crbug.com/40896400 2 - w3c/webextensions#369 3 - EFForg/privacybadger#2968 4 - https://chromiumdash.appspot.com/commit/486d638e6977dad73bd207dc914df9319afac152
Extensions'
declarativeNetRequest
rules are able to block requests initiated by other extensions. This is a change from MV2, wherechrome.webRequest
had no visibility of these requests.Example
An extension defines the following rule, with the intent of blocking requests to example.com on pages loaded in the browser:
Should another extension how wish to make a request to
example.com
from their background script/service worker, it will be blocked:Current browser status
I tested this in Chrome, Firefox and Safari using these test extensions. Steps to reproduce:
(For Firefox and Safari minor changes are needed for the extensions to load).
Results:
Discussion
We came across this issue due to a user reported issue on our extension repo (duckduckgo/duckduckgo-privacy-extension#1732). A
youtube.com
block rule was preventing the FeedBro extension from fetching RSS feeds from their background page. This was unexpected for us, as these requests are not visible inchrome.webRequest
.The issue can be mitigated by using a
excludedTabIds: [-1]
condition, however this also prevents the rule from matching requests initiated by website service workers (which is important for tracker blockers).I believe this issue will introduce significant unexpected extension breakage, plus introduce new ways for extensions to sabotage each other. For example, an extension could prevent a privacy extension from fetching updates to their blocklist rules.
The text was updated successfully, but these errors were encountered: