-
Notifications
You must be signed in to change notification settings - Fork 111
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
libidn2 breaks CIDR notation #50
Comments
Looks like idn2_lookup_ul() really normalizes non-domains, so I will need to restructure the code to support libidn2, but this will take some time. |
Not sure what the problem is. Could you give an example ? Maybe I can give you helping hand. |
Just query something with a / in it, e.g.:
You will see that the / will be removed. |
That is a TR46 preprocessing thing. And you are right, if something is a domain or not (e.g. IP or network address) currently isn't handled by libidn2. So the application has to decide. Just for the record, the described behavior can be reproduced by:
|
So that do you think about #53? Tests fine for all my test cases. |
You got my 👍 (= looks good) 6 days ago. |
libidn2 >= 2.0.3 must be used, or else it would silently remove characters not valid in hostnames like "/" and "_". For details see #50 . For more information about IDNA2003 vs. IDNA2008 and TR46 see: http://nmav.gnutls.org/2017/04/the-mess-with-internationalized-domain.html http://unicode.org/faq/idn.html https://fedoraproject.org/wiki/Changes/IDNA2008
There seems to be a problem when using libidn2 from #49 / 8ed6d73 with CIDR queries:
make clean; make all; ./whois -h whois.ripe.net 193.0.0.0/21
works
make clean; make all HAVE_LIBIDN=1; ./whois -h whois.ripe.net 193.0.0.0/21
works
make clean; make all HAVE_LIBIDN2=1; ./whois -h whois.ripe.net 193.0.0.0/21
returns:
%ERROR:101: no entries found
The text was updated successfully, but these errors were encountered: