diff options
author | Daniel Seebald <d.seebald@reizwerk.com> | 2015-09-17 12:12:31 +0200 |
---|---|---|
committer | Daniel Seebald <d.seebald@reizwerk.com> | 2015-09-17 12:12:31 +0200 |
commit | cc882a8b0cfee277ccef76f8964dd75adb481377 (patch) | |
tree | ef4d0c4151a61c74b381e4a5b61d335d242f6958 /src/etc/inc | |
parent | 0edcccc3982f37dd9447cdbd57bb9a2969776277 (diff) | |
download | pfsense-cc882a8b0cfee277ccef76f8964dd75adb481377.zip pfsense-cc882a8b0cfee277ccef76f8964dd75adb481377.tar.gz |
Fixed is_domain method call
Diffstat (limited to 'src/etc/inc')
-rw-r--r-- | src/etc/inc/util.inc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index a879e0e..627e6e8 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -835,7 +835,7 @@ function is_hostname($hostname, $allow_wildcard=false) { return false; } - if (is_domain($hostname, $allow_wildcard=false)) { + if (is_domain($hostname, $allow_wildcard)) { if ((substr_count($hostname, ".") == 1) && ($hostname[strlen($hostname)-1] == ".")) { /* Only a single dot at the end like "test." - hosts cannot be directly in the root domain. */ return false; @@ -852,7 +852,6 @@ function is_domain($domain, $allow_wildcard=false) { if (!is_string($domain)) { return false; } - if ($allow_wildcard) { $domain_regex = '/^(?:(?:[a-z_0-9\*]|[a-z_0-9][a-z_0-9\-]*[a-z_0-9])\.)*(?:[a-z_0-9]|[a-z_0-9][a-z_0-9\-]*[a-z_0-9\.])$/i'; } else { |