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

13.7.0 allows invalid URLs that are missing the port number #1862

Open
kaiyoma opened this issue Nov 9, 2021 · 2 comments
Open

13.7.0 allows invalid URLs that are missing the port number #1862

kaiyoma opened this issue Nov 9, 2021 · 2 comments

Comments

@kaiyoma
Copy link

kaiyoma commented Nov 9, 2021

Describe the bug
In 13.6.0, the string http://foo.com: would cause isURL to fail, which seems correct to me, since the port number is missing. However, in 13.7.0, this string passes validation. This seems wrong.

Examples
isURL('http://foo.com:')

Additional context
Validator.js version: 13.7.0
Node.js version: 14.15.0
OS platform: Windows 10, Linux

@tux-tn
Copy link
Member

tux-tn commented Nov 10, 2021

Probably introduced in #1833

@tux-tn
Copy link
Member

tux-tn commented Nov 12, 2021

After some research, actually this has been introduced in #1751, You can follow the discussion there to understand the reasons of the change (And no it's not a bug)
Thank you

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

2 participants