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

Ip addresses are parsed incorrectly #8

Open
nsteinberg-r7 opened this issue Sep 16, 2020 · 3 comments
Open

Ip addresses are parsed incorrectly #8

nsteinberg-r7 opened this issue Sep 16, 2020 · 3 comments

Comments

@nsteinberg-r7
Copy link

How to reproduce:
call extract_from_url with http://127.0.0.1 as input.
result will be {subdomain: 127.0.0, domain: 1}
expected behavior: throw Invalid Domain Error

@wavenator
Copy link
Contributor

Technically this is a valid domain. I'm not sure what to do here. Validating the domain here is weird.
Ensuring the domain is not an IP gonna be hard here. I think we should tolerate such cases.

@vihaanmody1
Copy link

It does not parse IP addresses

Tldextract can do this for you.

image

@elliotwutingfeng
Copy link

Technically this is a valid domain. I'm not sure what to do here. Validating the domain here is weird. Ensuring the domain is not an IP gonna be hard here. I think we should tolerate such cases.

From IETF RFC3696, top-level domain names cannot be all numeric (i.e. In the case of http://127.0.0.1, 1 is not a TLD, hence 127.0.0.1 cannot be a fully-qualified domain name (FQDN))

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

4 participants