summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-12-05 17:45:15 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-12-05 17:45:15 +0000
commit8777488bc3004337112a4a37896bd5d58391ce04 (patch)
treed78cbf86434487a1028f415e6dd214b3b312b3cc /etc/inc/util.inc
parent856887a3a4728f8fe084c7fb4a5fa253f32fa952 (diff)
downloadpfsense-8777488bc3004337112a4a37896bd5d58391ce04.zip
pfsense-8777488bc3004337112a4a37896bd5d58391ce04.tar.gz
MFC 15411
is_domain(): MS breaks all laws, so unserscores are allowed...
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc3
1 files changed, 1 insertions, 2 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 8bf31e3..88d1536 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -160,7 +160,7 @@ function is_hostname($hostname) {
if (!is_string($hostname))
return false;
- if (preg_match("/^[a-z0-9\-]+$/i", $hostname))
+ if (preg_match("/^([_a-z0-9\-]+\.?)+$/i", $domain))
return true;
else
return false;
@@ -376,7 +376,6 @@ function unlink_if_exists($fn) {
@unlink($fn);
}
}
-
/* make a global alias table (for faster lookups) */
function alias_make_table($config) {
OpenPOWER on IntegriCloud