-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Weird URL constructor behavior since 18.16.0 #51619
Labels
duplicate
Issues and PRs that are duplicates of other issues or PRs.
whatwg-url
Issues and PRs related to the WHATWG URL implementation.
Comments
cc @nodejs/url |
Duplicate: #51514 Already fixed. |
anonrig
added
the
whatwg-url
Issues and PRs related to the WHATWG URL implementation.
label
Jan 31, 2024
I recommend closing this issue. The fix is at #51542 |
lemire
added
the
duplicate
Issues and PRs that are duplicates of other issues or PRs.
label
Jan 31, 2024
@lemire, To which versions will this fix be backported? |
It will be backported to all release lines (18, 20 and 21) |
@anonrig Has it been included in |
Afaict, it isn't included. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
duplicate
Issues and PRs that are duplicates of other issues or PRs.
whatwg-url
Issues and PRs related to the WHATWG URL implementation.
Version
from 18.16.0 to 21.6.1
Platform
Darwin NVC00566 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64
Subsystem
No response
What steps will reproduce the bug?
So, to see the behavior, we need to compare two versions of Node.js. Let's take 18.15.0 and any version from (and including) 18.16.0.
new URL("https://0.0.0.0x100/")
TypeError: [ERR_INVALID_URL]: Invalid URL
; on 18.16.0, the URL will be parsed as valid. Browsers such as Firefox v122 and Chrome v121.0.6167.85 also throw the error.How often does it reproduce? Is there a required condition?
In 10 cases of 10
What is the expected behavior? Why is that the expected behavior?
The string should be accepted as an invalid URL, and the constructor should throw
TypeError: [ERR_INVALID_URL]: Invalid URL
What do you see instead?
An URL object with
'https://0.0.1.0/
hrefAdditional information
No response
The text was updated successfully, but these errors were encountered: