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

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

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

kaiyoma opened this issue Nov 9, 2021 · 2 comments
Labels
closed-as-stale For stale issues and PRs

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

@pano9000 pano9000 added closed-as-stale For stale issues and PRs and removed 🐛 bug 🔍needs-investigation labels Jan 18, 2025
@pano9000 pano9000 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-as-stale For stale issues and PRs
Projects
None yet
Development

No branches or pull requests

3 participants