[DNR] Accept rules with unrecognized keys
Categories
(WebExtensions :: Request Handling, enhancement, P2)
Tracking
(firefox128 fixed)
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: robwu, Assigned: willdurand)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, Whiteboard: [wecg][addons-jira])
Attachments
(1 file)
Firefox currently ignores static DNR rules when there are unrecognized properties in the file.
Chrome and Safari ignore these keys, and apply rules that are valid otherwise. In the WECG we reached consensus on ignoring unrecognized keys, so we should implement that. The relevant discussion is tracked at https://github.com/w3c/webextensions/issues/466
One would be inclined to consider adding "additionalProperties": { "$ref": "UnrecognizedProperty" },
to the various rule object definitions in declarative_net_request.json. The issue with that naive implementation is that updateDynamicRules
/ updateSessionRules
would then not throw when a rule is invalid, which would impede feature detection. So we should have manifest-specific behavior.
Fixing bug 1831417 could be an easy way to support this (along with fixing up failing unit tests).
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
Comment 3•11 months ago
|
||
bugherder |
Reporter | ||
Updated•11 months ago
|
Change are ready for review: Static DNR rules with unrecognized keys loaded #34522
Description
•