[DNR] Add permission warning for declarativeNetRequestFeedback and allow it to be requested as an optional permission
Categories
(WebExtensions :: Request Handling, task, P2)
Tracking
(firefox112 fixed)
| Tracking | Status | |
|---|---|---|
| firefox112 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
(Blocks 4 open bugs)
Details
(Whiteboard: [addons-jira])
Attachments
(2 files)
Currently, we only allow the declarativeNetRequestFeedback permission to be used when the extensions.dnr.feedback pref is set. Due to it being opt in via a pref, we didn't require a permission warning for it.
The declarativeNetRequestFeedback permission is currently only used by the testMatchOutcome method.
This does not match the intended behavior from Chrome and Safari.
The following features are dependent on declarativeNetRequestFeedback in Chrome:
The declarativeNetRequestFeedback permission is used to guard several features:
declarativeNetRequest.onRuleMatchedDebug(bug 1745773) (unpacked extensions only, in Chrome)declarativeNetRequest.getMatchedRules()(bug 1745765) (declarativeNetRequestFeedbackis optional when used withactiveTabpermission).action.getBadgeText()(ifdisplayActionCountAsBadgeTextofsetExtensionActionOptions()(bug 1745772) is used, see https://developer.chrome.com/docs/extensions/reference/action/#method-getBadgeText)
Presently, Chrome's declarativeNetRequest.testMatchOutcome() method does NOT depend on another permission. It is available by default to unpacked extensions.
Safari has also committed to implementing Chrome's behavior (described above) for getMatchedRules and setExtensionActionOptions. The other methods have not been implemented.
For compatibility, we should therefore make declarativeNetRequestFeedback available without pref and introduce a permission warning for it. To make sure that testMatchOutcome is unavailable by default, we could either reuse the pref for exactly the same purpose or introduce a new pref name for it, and/or lock it to temporarily installed extensions (which is Firefox's version of Chrome's unpacked extensions).
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
FYI: Chrome's permission warning is "Read your browsing history".
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 2•3 years ago
•
|
||
When Luca and I discussed this, we decided to continue requiring the declarativeNetRequestFeedback permission (or at least for the includeOtherExtensions option) for testMatchOutcome. We considered only exposing these APIs to temporarily loaded extensions, but decided to keep the pref for now.
| Assignee | ||
Comment 3•3 years ago
|
||
... and make the permission available by default, not gated on the extra
pref, to make sure that the permission warning shows up.
In the future, the DNR API will also use this permission even for
non-debugging APIs (e.g. bug 1745772), as mentioned in the bug.
| Assignee | ||
Comment 4•3 years ago
|
||
Updated•3 years ago
|
| Assignee | ||
Comment 5•3 years ago
•
|
||
Summary: [DNR] Add permission warning for declarativeNetRequestFeedback and remove extensions.dnr.feedback pref requirement → [DNR] Add permission warning for declarativeNetRequestFeedback and allow it to be requested as an optional permission
The new summary is fine, but note that the original summary was not inaccurate. The pref requirement for the permission was removed, which means that even without the pref enabled, that the user will see a permission warning.
Note that currently the main pref, extensions.dnr.enabled disables the permission and associated warning entirely.
See https://github.com/mdn/content/pull/22644/files#r1084315176 regarding documentation
| Assignee | ||
Comment 7•3 years ago
|
||
(In reply to rbloor from comment #6)
See https://github.com/mdn/content/pull/22644/files#r1084315176 regarding documentation
Let's apply that suggested edit. The preference continues to be required.
Comment 9•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7cb02c2fd778
https://hg.mozilla.org/mozilla-central/rev/87d02f235df4
Description
•