Repository navigation
URL.parse fails on URLs with comma separated hosts #48850
Description
Activity
- changed the title
[-]URL.parse fails on URLs with comma separated domains[/-][+]URL.parse fails on URLs with comma separated hosts[/+]on Jul 20, 2023 - addedurlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.
on Jul 20, 2023 With node v18.17.0, Ada 2.5.0 is delivered and we have the same issue.
We noticed that in node v20.4.0 , Ada 2.5.1 is delivered and there we dont have the issue.
Maybe it is possible to update also to Ada 2.5.1 in node v18.17.1 or something?
Reacted by evansnicholas and Debadree Chatterjeecc @nodejs/url
I don't think it is related to Ada? AFAIK
url.parse()is the legacy URL parser.url.parsecallstoASCIImethod which is implemented underada::idna::to_ascii.to_asciireturns an empty string if the value is invalid. In this particular case, we are receiving an empty string, which may be caused by this. Investigating it under: #48855Ah ok.
strange that it doesnt cause problems under ada 2.5.1 🙈
- added 2 commits that reference this issue
on Jul 22, 2023 - added 2 commits that reference this issue
on Jul 22, 2023 - added 2 commits that reference this issue
on Jul 27, 2023 3 remaining items
- added 2 commits that reference this issue
on Aug 14, 2023 - added 2 commits that reference this issue
on Aug 15, 2023 - added 2 commits that reference this issue
on Aug 16, 2023 With node v18.17.0, Ada 2.5.0 is delivered and we have the same issue.
We noticed that in node v20.4.0 , Ada 2.5.1 is delivered and there we dont have the issue.
Maybe it is possible to update also to Ada 2.5.1 in node v18.17.1 or something?
Still happening in v18.17.1, any plan to fix it?
It is fixed at #48873 and will be released in the next Node 18 release.
Reacted by Ray Dai and Michael HenriqueResolved with latest v18
Version
v18.17.0
Platform
Linux XXXXX 5.4.0-137-generic #154-Ubuntu SMP Thu Jan 5 17:03:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Parsing URL's with comma separated hosts throws a TypeError [ERR_INVALID_URL]: Invalid URL error. This URL parsed correctly in in node v18.16.1.
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
URL parsed rather than exception thrown.
What do you see instead?
An exception is thrown.
Additional information
This is a serious problem because such URL's are used reguarly when configuring eg DB connections which now fail. This is the case with the MongoDB driver for instance.