From 5f4b6ebb7b24faa48e73ca7391485fe53e67349b Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Wed, 13 Jan 2016 17:26:47 +0100 Subject: [PATCH] fixing #26: not allowing underscore in domain names (except at the beginning of a domain member, like _tcp) --- bureau/class/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bureau/class/functions.php b/bureau/class/functions.php index 7068b447..d06e6e7b 100644 --- a/bureau/class/functions.php +++ b/bureau/class/functions.php @@ -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; } }