jlu5 / Limnoria-SysDNS

SysDNS plugin for Limnoria
0 stars 0 forks source link

SysDNS doesn't handle IDNs #1

Open Mikaela opened 3 years ago

Mikaela commented 3 years ago

I got curious about compatibility of international domain names and tried to make one by myself and noticed that the plugin doesn't handle this scenario.

2021-189 10:35:05 EEST <~Mikaela> /dns ěťřö.mikaela.info
2021-189 10:35:06 EEST <@R-66Y> Host ěťřö.mikaela.info not found: 3(NXDOMAIN)

It works directly in terminal though

% host ěťřö.mikaela.info
ěťřö.mikaela.info is an alias for etro.mikaela.info.
etro.mikaela.info has address 135.181.156.69
etro.mikaela.info has IPv6 address 2a01:4f9:c010:eba3::1

Or if I give the punycode version:

2021-189 10:34:55 EEST <~Mikaela> R-66Y, dns xn--nda7esiub.mikaela.info
2021-189 10:34:56 EEST <@R-66Y> xn--nda7esiub.mikaela.info is an alias for etro.mikaela.info., etro.mikaela.info has address 135.181.156.69, and etro.mikaela.info has IPv6 address 2a01:4f9:c010:eba3::1

The stock Internet plugin also works while failing to point that it's a CNAME

2021-189 10:38:12 EEST <~Mikaela> /internet dns ěťřö.mikaela.info
2021-189 10:38:13 EEST <@R-66Y> 2a01:4f9:c010:eba3::1 and 135.181.156.69

I don't think there is a cache issue at play and I can reproduce it with my other domain.

2021-189 10:43:54 EEST <~Mikaela> /dns ěťřö.114077943.xyz
2021-189 10:43:55 EEST <@R-66Y> Host ěťřö.114077943.xyz not found: 3(NXDOMAIN)
2021-189 10:44:21 EEST <~Mikaela> R-66Y, dns xn--nda7esiub.114077943.xyz
2021-189 10:44:23 EEST <@R-66Y> xn--nda7esiub.114077943.xyz is an alias for etro.mikaela.info., etro.mikaela.info has address 135.181.156.69, and etro.mikaela.info has IPv6 address 2a01:4f9:c010:eba3::1

Additionally typing this I remembered another IDN domain:

2021-189 10:46:02 EEST <~Mikaela> /dns hän.fi
2021-189 10:46:03 EEST <@R-66Y> Host hän.fi not found: 3(NXDOMAIN)
2021-189 10:46:23 EEST <~Mikaela> /dns xn--hn-via.fi
2021-189 10:46:24 EEST <@R-66Y> xn--hn-via.fi has address 91.232.155.81, xn--hn-via.fi has IPv6 address 2001:67c:1be8:1337::443, xn--hn-via.fi mail is handled by 5 mail.kapsi.fi., and xn--hn-via.fi mail is handled by 10 mx2.kapsi.fi.
jlu5 commented 3 years ago

Strange, both of these queries work fine for me:

09:27:59 <!jlu5> `dns hän.fi
09:28:00 <%bitmonster> hän.fi has address 91.232.155.81
09:28:00 <%bitmonster> hän.fi has IPv6 address 2001:67c:1be8:1337::443
09:28:00 <%bitmonster> hän.fi mail is handled by 5 mail.kapsi.fi.
09:28:00 <%bitmonster> hän.fi mail is handled by 10 mx2.kapsi.fi.

09:28:54 <!jlu5> `dns ěťřö.114077943.xyz
09:28:56 <%bitmonster> ěťřö.114077943.xyz is an alias for etro.mikaela.info.
09:28:56 <%bitmonster> etro.mikaela.info has address 135.181.156.69
09:28:56 <%bitmonster> etro.mikaela.info has IPv6 address 2a01:4f9:c010:eba3::1

What versions of Limnoria and host are you running (host -V)? I wonder if this is an encoding issue or something..

Mikaela commented 3 years ago

The current (running) version of this Limnoria is 2021.06.30, running on Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]. The newest versions available online are 2021.06.15 (in master), 2021.07.04 (in testing).

└┌(%:~)┌- host -V
host 9.16.15-Debian

The IRCd is ergo-2.7.0 and has UTF8ONLY in ISUPPORT

jlu5 commented 3 years ago

From discussion on IRC: I'm running host 9.11.5-P4-5.1+deb10u5-Debian and couldn't reproduce this, even when connected to the same network as R-66Y.

<jlu5> sysdns is like 7 years old at this point and a really simple plugin, I've never seen anything like this