-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Describe the bug
A URL of the form http://[email protected] is rejected by isURL() even though it should be a valid URL according to RFC 1738 (section 3.1)
Some or all of the parts "<user>:<password>@", ":<password>", ":<port>", and "/<url-path>" may be excluded.
Examples
An example from the Node REPL:
$ node
Welcome to Node.js v12.20.0.
Type ".help" for more information.
> var validator = require('validator');
undefined
> validator.isURL('http://[email protected]')
false
> validator.isURL('http://user:@example.com')
true
Additional context
Validator.js version: 13.5.1
Node.js version: 12.20.0
OS platform: linux (Ubuntu 20.04)
Pull Request
I'll send a PR shortly.