diff options
author | Chris Buechler <cmb@pfsense.org> | 2014-10-21 00:40:22 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2014-10-21 00:40:22 -0500 |
commit | 2fb669485897c0033afde56d0ac4cc37dbf13494 (patch) | |
tree | c87bdba5905ee2b12081ffba1c4303600c7f5a2c /etc | |
parent | a23adfbaa079f0f3075343495746e1d613907a25 (diff) | |
download | pfsense-2fb669485897c0033afde56d0ac4cc37dbf13494.zip pfsense-2fb669485897c0033afde56d0ac4cc37dbf13494.tar.gz |
hostnames can end with a . (and actually always do, it's just usually implied), so allow that here. Fixes wrong input validation in parts of nsupdate GUI, among other things.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/util.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index a9e533f..c3ec285 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -644,7 +644,7 @@ function is_domain($domain) { if (!is_string($domain)) return false; - if (preg_match('/^(?:(?:[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', $domain)) + if (preg_match('/^(?:(?:[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', $domain)) return true; else return false; |