From 856887a3a4728f8fe084c7fb4a5fa253f32fa952 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 5 Dec 2006 17:42:57 +0000 Subject: MFC 15402 is_domain(): domains must not contain underscores; empty strings are not valid --- etc/inc/util.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/etc/inc/util.inc b/etc/inc/util.inc index b0cbfda..8bf31e3 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -171,7 +171,7 @@ function is_domain($domain) { if (!is_string($domain)) return false; - if (preg_match("/^([_a-z0-9\-]+\.?)*$/i", $domain)) + if (preg_match("/^([a-z0-9\-]+\.?)+$/i", $domain)) return true; else return false; @@ -391,7 +391,6 @@ function alias_make_table($config) { } } } - /* check if an alias exists */ function is_alias($name) { @@ -555,4 +554,4 @@ function mac_format($clientmac) { } } -?> \ No newline at end of file +?> -- cgit v1.1