-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix(isURL): fix CVE-2025-56200 #2610
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
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
87a5cde
fix(isURL): fix CVE-2025-56200
WikiRik 2e08bb2
ci: remove Node 6
WikiRik 6aed799
test(isURL): split isURL tests to separate file
WikiRik 4521994
feat(isURL): rewrite isURL with native URL constructor
WikiRik cf66832
ci: update rollup and split build/test ci jobs
WikiRik 8347fdc
chore: fix typo
WikiRik f65e2e4
ci: undo CI changes
WikiRik 57f5a0b
chore: undo build changes
WikiRik 69c2aad
fix: add back Node 8 compatibility
WikiRik 6e92526
chore: fix lint
WikiRik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Check failure
Code scanning / CodeQL
Incorrect suffix check High
Copilot Autofix
AI 5 months ago
To fix the problem in line 222, ensure that the result of
indexOf('://')is not-1before making a position comparison. The best practice would be:originalUrl.indexOf('://')in a variable (e.g.,protoIdx).protoIdx !== -1 && protoIdx === originalUrl.length - 3This avoids the case where both sides are
-1due to missing substring, and thus avoids a false positive. Restrict the change to just the affected region around line 222.No new methods or complex imports are needed—just a minor code change to add the variable and condition.