Skip to content
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

isURL() doesn't accept URLs with only a username in the userinfo subcomponent #1643

Closed
jbuchmann-coosto opened this issue Apr 12, 2021 · 1 comment

Comments

@jbuchmann-coosto
Copy link
Contributor

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.

@profnandaa
Copy link
Member

merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants