-
Notifications
You must be signed in to change notification settings - Fork 81
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
Specific redirect filter can't override generic redirection on 1.31.0 #1388
Comments
To neuter redirection, use an exception filter:
To override the current redirection with another redirection, use a priority higher than 0:
|
So is this by design? Should we change past fixes such as |
But it's preferable to use priority, so this leave more control to end users. |
|
By the way, there is a regression in dev build which causes the prioritized filter to not take effect, I will fix this. |
Should we start prioritising existing |
You're right, I will have to investigate. At least priority works, so this will have to be the fix -- which is preferable anyways as said above. |
All right, closing. I'll add fixes for rocketnews and tv-asahi, but probably there're some more. |
These will have to be replaced by the more appropriate exception filter:
Cancel the matching |
Whoops, at least |
Wouldn't adding a priority |
Well |
Why not just try it and report result? |
I did, since logger now reports both post refactorisation, can't tell which one gets applied on
By both I mean the generic existing GA redirection and the |
The last one is always the one taken, as confirmed by the yellow line just above it. |
Related issue: - uBlockOrigin/uBlock-issues#1388 Regression from: - cf2c638
Yeah, I saw that, it's |
|
Oddly, all other WAR resources are getting priority and even without adding |
Related issue: - uBlockOrigin/uBlock-issues#1388 Fixed the special `none` redirect resource no longer being enforced. Fixed the enforcement of `important` redirect rules over exceptions and non-important ones.
When they all have the same priority (default is 0), then which one will be used in the end is undefined, down to luck. |
Possible add this into wiki #1388 (comment), rare people read all uBO code (imo also no on releases noted cited). |
Is this right: https://github.com/uBlockOrigin/uBlock-issues/wiki/Static-filter-syntax/_compare/ae1df4fe0413d9b6c2232adfaa5670ff9dc9079b ? This is not all, I should probably mention about |
While |
You have steps to reproduce which demonstrate that priority does not work for |
I can't remember why I put this capability in, could have been as a fall back in case of unforeseen issue when redirecting to web-resource-accessible. No need to document, I may just remove this eventually given there has been no use case for this yet. |
URL (probably geo-restricted, use Japanese VPN): 1st step: add 2nd step: visit the page and play the video, see redirect doesn't occur. But occurs for noop.js. |
I can reproduce, I will need to investigate, unexpected. |
That rule seems to be untrue, as the redirection does occur when |
Ok, it's because |
About |
This was based on gorhill/uBlock@c6d0204#commitcomment-45025274 |
Prerequisites
Description
In older versions, you could override where to redirect by creating a specific filter vs. generic redirect filter. E.g. uBlock Privacy has a generic redirect filter
||googletagmanager.com/gtm.js$script,redirect=googletagmanager.com/gtm.js
but you could override it by e.g.||googletagmanager.com/gtm.js$important,script,redirect=noopjs,domain=tv-asahi.co.jp
(taken from the same list) and IIRC$important
was not mandatory. However on 1.31.0 it doesn't work any more.A specific URL where the issue occurs
https://rocketnews24.com/
Steps to Reproduce
@@||googletagmanager.com/gtm.js$script,domain=rocketnews24.com
, clear cache & cookie, reload the page and see they're now loaded - but actually exception is not needed, redirecting to noop.js works.||googletagmanager.com/gtm.js$important,script,redirect=noop.js,domain=rocketnews24.com
or||googletagmanager.com/gtm.js$important,script,redirect=none,domain=rocketnews24.com
and see the request still redirects togoogletagmanager.com/gtm.js
. Relaunch browser or whatsoever doesn't help, only way to make it work seems to be badfilter.Expected behavior:
The specific redirect rule should override generic one.
Actual behavior:
Generic filter wins.
Your environment
The text was updated successfully, but these errors were encountered: