-
- Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Description
- Version: v7.2.1
- Platform: Darwin Jans-MacBook-Pro-2.local 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
- Subsystem: url
Executing:
const { URL } = require('url'); new URL('http://1234.com'); new URL('http://123456789.com');all throw
TypeError: Invalid URL at Object.URL.binding.parse (internal/url.js:85:17) at new URL (internal/url.js:81:13) at repl:1:1 at realRunInThisContextScript (vm.js:22:35) at sigintHandlersWrap (vm.js:98:12) at ContextifyScript.Script.runInThisContext (vm.js:24:12) at REPLServer.defaultEval (repl.js:346:29) at bound (domain.js:280:14) at REPLServer.runBound [as eval] (domain.js:293:12) at REPLServer.onLine (repl.js:545:10) all following work without a problem:
const { URL } = require('url'); new URL('http://123.com'); new URL('http://1234567890.com');The bug doesn't happen in the browser. It looks like it tries to parse an IP address or something?
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.