Convert to punycode when adding domain

Exaweb

Verified User
Joined
Nov 6, 2009
Messages
17
Location
Gram, Denmark
Hello,

I had looked at a adding that before. I have not yet ruled it out and do plan on adding it eventually, but the actual code required to do the conversion is not pretty and is immensely long. If php had a built-in IDN function for encoding and decoding domains with that, that would save me from having to reinvent the wheel. Or if anyone knows of any good php classes or script that can do it which are GNU licensed that would work as well. I had found a c library to do it, but that won't work for our binary setup. It would either have to be coded right into the DA code, or an external script that DA calls.

John
 
To both Exaweb and John:

The LGPL has no restrictions preventing it from being called by DirectAdmin.

Jeff
 
Ow, it really frustrates me when a customer adds a sub-domain with ø and Bind is going down afterwards..

It shouldn't be normal that a customer can let Bind crash, by just adding a subdomain including a non A-Z character?
 
Ow, it really frustrates me when a customer adds a sub-domain with ø and Bind is going down afterwards..

It shouldn't be normal that a customer can let Bind crash, by just adding a subdomain including a non A-Z character?
I just tried that and nothing bad happend.
 
I just tried that and nothing bad happend.

Well, Bind isn't actually going down right afterwards, but it never comes up if you restart the service.

Add a subdomain with a character like ø or whatever, and run "service named restart" or "/etc/init.d/named restart" (depending on OS) afterwards. Bind will fail to start.


Edit: just tested it again, and seems only to happen on some of my machines. When i open the db files in /var/named, the machine who fails shows it as "ø 14400 IN A " and another shows it as "� 14400 IN A ".
 
Last edited:
Yes, same error appears in the log-files as when i restart named:

Code:
Jul  5 20:41:27 server1 named: /var/named/demodomain.dk.db:20: \248.demodomain.dk: bad owner name (check-names)
Jul  5 20:41:27 server1 named: /var/named/demodomain.dk.db:28: www.\248.demodomain.dk: bad owner name (check-names)
Jul  5 20:41:27 server1 named: zone demodomain.dk/IN: loading master file /var/named/demodomain.dk.db: bad owner name (check-names)
Jul  5 20:41:27 server1 named: _default/demodomain.dk/IN: bad owner name (check-names)

I'm sure this issue is about encoding. On some of my machines the subdomain is written as ø.demodomain.dk in the zone-files, and on other machines it is written as �.demodomain.dk. The first one results in a error like shown above.
 
Last edited:
I don't know enough about punycode to know what a ø means in punycode; probably nothing since punycode is supposed to be the standard ascii characters, and the ø is NOT a standard character. Probably something didn't get translated properly.

Jeff
 
Hello,

There is not yet support for punycode conversion with DA. It is a common request and we do have plans to implement it in the future.

John
 
Number of top level domains on native languages is increased each year. Now, here in Russia we begin use domains like росс****************.р******** for example. Instead old IDN domains here is first level domain also on native language. From technical reason it is not big problem as for machine it is a puny coded domain name but for end-user this create big problems. Imagine if customer has about 100 such domains on his account and use Directadmin how he could track and manage such domains? This will be just a great problem. It is problem not only Directadmin but cPanel and some other control panels too.
 
Solved for us without a pain. We do show Russian domains both in Cyril and punnycode (encoding/decoding with PHP class when showing and JavaScript while adding).
The problem is, when a client access a FTP. But it has nothing to deal with directadmin itself.


p.s. Directadmin forum does not allow to use and display Cyril chars cause it use «charset=ISO-8859-1».
 
Back
Top