mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Propperly fix openvpn parameter parsing.
This commit is contained in:
parent
cee476e886
commit
3e2bd5deb8
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user