DNR redirect rule issue: "The page isn’t redirecting properly"
Categories
(WebExtensions :: Request Handling, defect, P2)
Tracking
(firefox113 fixed, firefox114 fixed)
People
(Reporter: rhill, Assigned: robwu)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, Whiteboard: [addons-jira])
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
Link to GitHub issue where this was first reported to me: https://github.com/uBlockOrigin/uBOL-issues/issues/39
Detailed steps to reproduce:
- Download uBOLite_0.1.23.4076.firefox.mv3.xpi
- From
about:debugging#/runtime/this-firefox, load downloaded package as temporary add-on - Option page opens automatically, select Optimal mode (accept permission warning)
- Scroll down the options page and check the list AdGuard URL Tracking Protection
- Opens a new tab and navigate to
https://example.org/
Result: "The page isn’t redirecting properly"
If I manually remove the first rule in rulesets/removeparam/adguard-spyware-url.json, the navigation stops failing. It is this one particular rule in that one particular ruleset causing the issue, as removing all the other rules in the same ruleset does not resolve the failure.
I simplified the rule to a minimum with which the issue can be reproduced:
[
{
"action": {
"redirect": {
"transform": {
"queryTransform": {
"removeParams": [
"__hsfp"
]
}
}
},
"type": "redirect"
},
"id": 1
}
]
If I add a the following condition to the rule, it stops failing:
"requestDomains": [
"example.org"
],
| Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
Comment 3•2 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 4•2 years ago
|
||
Comment on attachment 9329798 [details]
Bug 1829404 - Interrupt obvious redirect loop without aborting
Beta/Release Uplift Approval Request
- User impact if declined: Redirect loop when an extension registers a redirect rule with DNR that ends up not rewriting the URL. DNR is new to Firefox 113.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Small patch that only affects DNR, where the desired behavior is verified by unit tests.
- String changes made/needed: None
- Is Android affected?: Yes
| Assignee | ||
Comment 5•2 years ago
|
||
No changelog needed since I anticipate the uplift getting approved.
However, it would be good to document the behavior here (which is now the same in Firefox and Chrome (Chromium source)). That is:
- When the redirect action does not change the request, the request is not redirected.
- (not changed in this bug, but the actual implementation and not documented) if the redirect URL is somehow invalid (e.g. by a
redirect.regexSubstitutionvalue that is not a valid URL), the request is not redirected. - When not redirected, the request continues as usual.
Comment 6•2 years ago
|
||
Comment on attachment 9329798 [details]
Bug 1829404 - Interrupt obvious redirect loop without aborting
Approved for 113.0b8.
Comment 7•2 years ago
|
||
| bugherder uplift | ||
Documentation updated in mdn/content PR #26528
Description
•