Repository navigation
Conversation
AI-Assisted-By: Claude Opus 5.5 (xhigh)
This was referenced Oct 15, 2026
Author
|
Closing this here, as this repository is a mirror that only takes merge requests on GitLab. Moved to https://gitlab.com/ClearURLs/rules/-/merge_requests/89 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
Two existing redirections are broader than the wrappers they target. This is a bug fix for both; no other field changes.
instagram: the redirection is
.*u=([^&]*). It has no anchor, so it applies to any instagram.com url that containsu=somewhere, including inside another parameter name such asmenu=. It also accepts any scheme.https://www.instagram.com/accounts/login/?next=%2Fp%2Fabc%2F&u=12becomes12, so the login link is lost.https://l.instagram.com/?u=javascript%3Aalert(1)&e=xbecomesjavascript:alert(1).vk.com:
to=([^&]*)accepts any scheme, sohttps://vk.com/away.php?to=javascript%3Aalert(1)becomesjavascript:alert(1).The new patterns only match the link shims themselves (
l.instagram.com/?u=,lm.instagram.com/?u=,vk.com/away.php?to=). The destination must start withhttp://orhttps://, plain or URL-encoded. Valid links keep working exactly as before. TheurlPatternof both providers stays as it is.Affected fields
redirectionsof the providerinstagramredirectionsof the providervk.comChange in data.min.json
Example URLs
https://l.instagram.com/?u=https%3A%2F%2Fexample.com%2Fshop%3Fid%3D1&e=AT0abcDEFhttps://example.com/shop?id=1https://lm.instagram.com/?u=https%3A%2F%2Fexample.com%2F&e=AT1xhttps://example.com/https://www.instagram.com/accounts/login/?next=%2Fp%2Fabc%2F&u=1212https://l.instagram.com/?u=javascript%3Aalert(1)&e=xjavascript:alert(1)https://l.instagram.com.evil.example/?u=https%3A%2F%2Fexample.com%2F&e=xhttps://example.com/https://vk.com/away.php?to=https%3A%2F%2Fexample.com%2Fseite%3Fa%3D1&cc_key=https://example.com/seite?a=1https://vk.com/away.php?to=javascript%3Aalert(1)javascript:alert(1)Note
59 of the 64 redirections in the current catalog do not limit the captured destination to http(s) either. Most of them are anchored to one wrapper path, so the risk is low, but the same
(https?(?::|%3[Aa])(?:\/|%2[Ff]){2}[^&#]+)capture could be used there in later, separate pull requests.Testing
Tested offline in URL Check 3.5 (Android 15 emulator), which applies this catalog with Java regexes: "Before" is the current catalog, "After" the catalog with this change; all 9 instagram and vk cases above as expected, 50 of 50 together with the two companion changes (globalRules, LinkedIn). The patterns give the same results in JavaScriptCore, with and without the
iflag. Inputs up to 160 KB (long hosts, many parameters, long tokens) took at most 10 ms per pattern in Java and 8 ms in JavaScriptCore, with no stack overflow at a 512 KB thread stack.Companion PRs: #345 (LinkedIn redirections), #347 (globalRules). The three change different fields and merge without conflict in any order.
AI-Assisted-By: Claude Opus 5.5 (xhigh)