-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 validates true to '[email protected]' #1375
Comments
Hi @profnandaa & @Arsikod, I checked the code. It seems like we have to modify the logic in line: 96 Lines 90 to 99 in f67a57f
The implementation fails to check if the url is in basic auth form without password, that looks like this:
For the fix, we just have to check if it's in the right form. if (auth.indexOf(':') === -1 || (auth.indexOf(':') >= 0 && auth.split(':').length > 2)) {
return false;
} This way, [email protected] will pass the condition and return false. I'll submit a PR if you guys agree with the change. Thanks! |
+1 - this is a serious issue. |
@anay-kava feel free to submit a PR concerning this issue |
Hi. Please see #1425. |
closed in #1425 |
console.log(validator.isURL("[email protected]")) returns true.
But it is not a valid url.
The text was updated successfully, but these errors were encountered: