-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.v18.xIssues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.
Description
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.
const URL = require('url');
URL.parse("mongodb://127.0.0.1,127.0.0.2:27017")
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.
3XC1T3D and exiadbq
Metadata
Metadata
Assignees
Labels
urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.v18.xIssues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.