poweradmin/poweradmin — Issue #1: wrong length check in is_valid_hostname_fqdn()
Author: raoulbhatia
Created: 2012-01-11 13:14:46+00:00
State: open

hi!

in dns.inc.php, function is_valid_hostname_fqdn()

```PHP
$hostname = preg_replace("/\.$/","",$hostname);

if (strlen($hostname) > 255) {
error(ERR_DNS_HN_TOO_LONG);
return false;
}
```

i think that the length check is wrong because 255 *includes* the trailing dot.

please see
http://en.wikipedia.org/wiki/Domain_name#Domain_name_syntax and
http://en.wikipedia.org/wiki/Domain_name#cite_note-3

thank you,
raoul