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

Whois output is not correctly parsed if it contains empty lines #40

Open
stollr opened this issue Feb 19, 2019 · 4 comments
Open

Whois output is not correctly parsed if it contains empty lines #40

stollr opened this issue Feb 19, 2019 · 4 comments

Comments

@stollr
Copy link

stollr commented Feb 19, 2019

If the raw output of the whois query contains empty lines, the while loop in the get_blocks function of file whois.parser.php stops before all lines are processed.

The reason is obvious:

while ($val = current($rawdata))

$val is falsy when the line is empty.

Imho this is a big issue. Because Whois is telling that a domain is free, although it is wrong.

@stollr
Copy link
Author

stollr commented Feb 19, 2019

The problem does not occur for .com domains, but it happens for example for .de domains.

@jsmitty12
Copy link
Owner

Interesting. Obviously the original authors never anticipated whois data to contain blank lines.

Do you know of a domain that has whois data with a blank line in it so we can create a test for it?

@stollr
Copy link
Author

stollr commented Feb 19, 2019

google.de for example ;)

@jsmitty12
Copy link
Owner

This one is pretty tricky... I think I'm going to have to either rewrite the easy_parser() function or write a completely new parser to handle this.

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