operasoftware / dns-ui

Opera's LDAP-authenticated PowerDNS user interface
Apache License 2.0
282 stars 58 forks source link

Punycode (international) domains are not handled #149

Closed basos9 closed 4 years ago

basos9 commented 5 years ago

Domain with internation characters encoded in punycode is properly handled by powerdns command line tools (pdnsutils) while dnsui has problems handling it.
Version

1c89972 - (tag: v0.2.3)

Dns ui presents the domain properly.

But when you try to make any changes an error is thrown

request from browser
PATCH https://ns1.test.gr/api/v2/zones/xxx.%CE%B5%CE%BB.

response
HTTP/1.1 500 Internal server error

server log
[Fri Jun 28 13:39:32.365770 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: ZoneNotFound in /var/www/dnsui/model/zonedirectory.php:191, referer: https://ns1.test.gr/zones/xxx.xn--qxam
[Fri Jun 28 13:39:32.366273 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: Stack trace:, referer: https://ns1.test.gr/zones/xxx..xn--qxam
[Fri Jun 28 13:39:32.366517 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: #0 /var/www/dnsui/views/api.php(144): ZoneDirectory->get_zone_by_name('xxx.\\xCE\\xB5\\xCE\\xBB.'), referer: https://ns1.test.gr/zones/xxx.xn--qxam
[Fri Jun 28 13:39:32.366799 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: #1 /var/www/dnsui/views/api.php(63): API->update_zone_rrsets('xxx.\\xCE\\xB5\\xCE\\xBB.'), referer: https://ns1.test.gr/zones/xxx.xn--qxam
[Fri Jun 28 13:39:32.367093 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: #2 /var/www/dnsui/views/api.php(106): API->options(Array, Array), referer: https://ns1.test.gr/zones/xxx.xn--qxam
[Fri Jun 28 13:39:32.367334 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: #3 /var/www/dnsui/views/api.php(33): API->zone('xxx.\\xCE\\xB5\\xCE\\xBB.'), referer: https://ns1.test.gr/zones/xxx.xn--qxam
[Fri Jun 28 13:39:32.367527 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: #4 /var/www/dnsui/requesthandler.php(64): require('/var/www/dnsui/...'), referer: https://ns1.test.gr/zones/xxx.xn--qxam
[Fri Jun 28 13:39:32.367742 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: #5 /var/www/dnsui/public_html/init.php(18): require('/var/www/dnsui/...'), referer: https://ns1.test.gr/zones/xxx.xn--qxam
[Fri Jun 28 13:39:32.367962 2019] [:error] [pid 13050] [client 127.127.127.1:53328] 1561729172: #6 {main}, referer: https://ns1.test.gr/zones/xxx.xn--qxam

while the presenation works


request
GET https://ns1.test.gr/zones/xxx.xn--qxam

response
HTTP/1.1 200 OK