diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-05-07 21:07:27 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-05-07 21:07:27 +0000 |
commit | 3e2bd5deb8ad20d74047bef7482b110b5d472fb5 (patch) | |
tree | e8026c6c7aabbbf29f73ed6ca552fd74d986a930 /etc | |
parent | cee476e88622b5d8856a3913a44bf41f719f9c37 (diff) | |
download | pfsense-3e2bd5deb8ad20d74047bef7482b110b5d472fb5.zip pfsense-3e2bd5deb8ad20d74047bef7482b110b5d472fb5.tar.gz |
Propperly fix openvpn parameter parsing.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/openvpn.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 9c3d69f..fe7be42 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -168,14 +168,14 @@ function openvpn_get_cipherlist() { function openvpn_validate_host($value, $name) { $value = trim($value); - if (empty($value) || !is_domain($value) || !is_ipaddr($value))) + if (empty($value) || (!is_domain($value) && !is_ipaddr($value))) return "The field '$name' must contain a valid IP address or domain name."; return false; } function openvpn_validate_port($value, $name) { $value = trim($value); - if (empty($value) || !is_numeric($value) || $value < 0 || ($value > 65535))) + if (empty($value) || !is_numeric($value) || $value < 0 || ($value > 65535)) return "The field '$name' must contain a valid port, ranging from 0 to 65535."; return false; } |