diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-12-05 17:42:57 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-12-05 17:42:57 +0000 |
commit | 856887a3a4728f8fe084c7fb4a5fa253f32fa952 (patch) | |
tree | 1a0660a43f9453462121c2acd6815b66a3624dda | |
parent | c4b966b71b96d2cd400da44aa243bcfa3eba2167 (diff) | |
download | pfsense-856887a3a4728f8fe084c7fb4a5fa253f32fa952.zip pfsense-856887a3a4728f8fe084c7fb4a5fa253f32fa952.tar.gz |
MFC 15402
is_domain(): domains must not contain underscores; empty strings are not valid
-rw-r--r-- | etc/inc/util.inc | 5 |
1 files 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 +?> |