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

Allows "http://www.google" when it shouldn't #27

Open
ghost opened this issue Nov 1, 2018 · 2 comments
Open

Allows "http://www.google" when it shouldn't #27

ghost opened this issue Nov 1, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 1, 2018

The modules allows:

and disallows:

  • "www.google"
  • "google"
  • "google#.com"
  • "google-.co"

The problem is that it ALLOWS http://www.google when it shouldn't.

@ghost ghost mentioned this issue Nov 1, 2018
@simonhaenisch
Copy link

Not sure why you consider that an invalid url? Just because it's not (yet) a registered TLD? A user/company might have that domain set up in their local network and then www.google could actually resolve (e. g. to an intranet).

I guess you can use sth like tldExists from tldjs for your use-case.

@crunchiness
Copy link

It is actually a registered TLD and used (try https://dns.google/ ), so definitely not a bug.

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

No branches or pull requests

2 participants