Prerequisites
I tried to reproduce the issue when...
Description
If a urlskip has multiple regexes, the second and beyond instances will be replaced with the first. This is due to a cache:
https://github.com/gorhill/uBlock/blob/74b838cc0367fc3d5d2e538325f9d85eec71615c/src/js/urlskip.js#L134-L138
I've confirmed in a debugger and this is definitely what's happening.
A specific URL where the issue occurs.
https://links.vinted.com/e/t/aHR0cHM6Ly93d3cudmludGVkLmNvLnVrL2UvaXRlbT9pZD0xMjM0NTY3ODkwfDAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMHxBMGFhYUFhYV9BMEEwQWFhQUFBYUFhQTAtYUFhYTBhYUFBQUFBQWFhQUFhPQ==
Steps to Reproduce
- Add a filter
||links.vinted.com/e/t/$document
- Add a filter
||links.vinted.com$document,urlskip=/\/e\/t\/([A-Za-z0-9=]+)/ -base64 /^(.*?)\|/
- Go to the reproduction URL (matches the pattern of a real URL perfectly but anonymised)
- Notice the link is blocked but no redirect URL is shown
- Edit the second filter to
||links.vinted.com$document,urlskip=/\/e\/t\/([A-Za-z0-9=]+)/ -base64
- Notice a redirect URL is shown
- Notice the second regex should work fine
- Revert to the original second filter, set a breakpoint on https://github.com/gorhill/uBlock/blob/74b838cc0367fc3d5d2e538325f9d85eec71615c/src/js/urlskip.js#L135 and notice
/\/e\/t\/([A-Za-z0-9=]+)/ is used twice
Expected behavior
A redirect URL is shown of https://www.vinted.co.uk/e/item?id=1234567890.
Actual behavior
No redirect URL is shown.
uBO version
1.68.0
Browser name and version
Zen (1.17.15b)
Operating System and version
macOS
Prerequisites
I tried to reproduce the issue when...
Description
If a
urlskiphas multiple regexes, the second and beyond instances will be replaced with the first. This is due to a cache:https://github.com/gorhill/uBlock/blob/74b838cc0367fc3d5d2e538325f9d85eec71615c/src/js/urlskip.js#L134-L138
I've confirmed in a debugger and this is definitely what's happening.
A specific URL where the issue occurs.
https://links.vinted.com/e/t/aHR0cHM6Ly93d3cudmludGVkLmNvLnVrL2UvaXRlbT9pZD0xMjM0NTY3ODkwfDAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMHxBMGFhYUFhYV9BMEEwQWFhQUFBYUFhQTAtYUFhYTBhYUFBQUFBQWFhQUFhPQ==Steps to Reproduce
||links.vinted.com/e/t/$document||links.vinted.com$document,urlskip=/\/e\/t\/([A-Za-z0-9=]+)/ -base64 /^(.*?)\|/||links.vinted.com$document,urlskip=/\/e\/t\/([A-Za-z0-9=]+)/ -base64/\/e\/t\/([A-Za-z0-9=]+)/is used twiceExpected behavior
A redirect URL is shown of
https://www.vinted.co.uk/e/item?id=1234567890.Actual behavior
No redirect URL is shown.
uBO version
1.68.0
Browser name and version
Zen (1.17.15b)
Operating System and version
macOS