fixing #26: not allowing underscore in domain names (except at the beginning of a domain member, like _tcp)
This commit is contained in:
parent
6398702f74
commit
5f4b6ebb7b
|
@ -273,7 +273,7 @@ function checkfqdn($fqdn) {
|
|||
}
|
||||
// Note: a.foo.net is a valid domain
|
||||
// Note: RFC1035 tells us that a domain should not start by a digit, but every registrar allows such a domain to be created ... too bad.
|
||||
if (!preg_match("#^[a-z0-9_]([a-z0-9-_]*[a-z0-9_])?$#i", $val)) {
|
||||
if (!preg_match("#^[a-z0-9_]([a-z0-9-]*[a-z0-9])?$#i", $val)) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue