-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
fixedissue has been addressedissue has been addressed
Description
Prerequisites
- I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
- This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
- This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
- I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
- The issue is not present after disabling uBO in the browser.
- I checked the documentation to understand that the issue I am reporting is not normal behavior.
I tried to reproduce the issue when...
- uBO is the only extension.
- uBO uses default lists and settings.
- using a new, unmodified browser profile.
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
Metadata
Metadata
Assignees
Labels
fixedissue has been addressedissue has been addressed