Bug #16899 ยป 16899.patch
| src/usr/local/www/vpn_openvpn_csc.php | ||
|---|---|---|
|
}
|
||
|
}
|
||
|
if ($pconfig['dns_domain_enable']) {
|
||
|
if (!empty($pconfig['dns_domain']) &&
|
||
|
!is_hostname($pconfig['dns_domain'])) {
|
||
|
$input_errors[] = gettext("DNS Default Domain must contain a valid DNS host or domain name");
|
||
|
}
|
||
|
}
|
||
|
if ($pconfig['dns_server_enable']) {
|
||
|
if (!empty($pconfig['dns_server1']) && !is_ipaddr(trim($pconfig['dns_server1']))) {
|
||
|
$input_errors[] = gettext("The field 'DNS Server #1' must contain a valid IP address");
|
||
| ... | ... | |
|
!array_key_exists($pconfig['netbios_ntype'], $netbios_nodetypes)) {
|
||
|
$input_errors[] = gettext("The selected NetBIOS Node Type is not valid.");
|
||
|
}
|
||
|
if (!empty($pconfig['netbios_scope']) &&
|
||
|
!is_hostname($pconfig['netbios_scope'])) {
|
||
|
$input_errors[] = gettext("NetBIOS Scope ID must contain a valid DNS host or domain name");
|
||
|
}
|
||
|
}
|
||
|
$reqdfields[] = 'common_name';
|
||
| src/usr/local/www/vpn_openvpn_server.php | ||
|---|---|---|
|
}
|
||
|
}
|
||
|
if ($pconfig['dns_domain_enable']) {
|
||
|
if (!empty($pconfig['dns_domain']) &&
|
||
|
!is_hostname($pconfig['dns_domain'])) {
|
||
|
$input_errors[] = gettext("DNS Default Domain must contain a valid DNS host or domain name");
|
||
|
}
|
||
|
}
|
||
|
if ($pconfig['dns_server_enable']) {
|
||
|
if (!empty($pconfig['dns_server1']) && !is_ipaddr(trim($pconfig['dns_server1']))) {
|
||
|
$input_errors[] = gettext("The field 'DNS Server #1' must contain a valid IPv4 or IPv6 address");
|
||
| ... | ... | |
|
!array_key_exists($pconfig['netbios_ntype'], $netbios_nodetypes)) {
|
||
|
$input_errors[] = gettext("The selected NetBIOS Node Type is not valid.");
|
||
|
}
|
||
|
if (!empty($pconfig['netbios_scope']) &&
|
||
|
!is_hostname($pconfig['netbios_scope'])) {
|
||
|
$input_errors[] = gettext("NetBIOS Scope ID must contain a valid DNS host or domain name");
|
||
|
}
|
||
|
}
|
||
|
if ($pconfig['maxclients'] && !is_numericint($pconfig['maxclients'])) {
|
||
| src/usr/local/www/wizards/openvpn_wizard.inc | ||
|---|---|---|
|
!strstr($_POST['tlssharedkey'], "-----END OpenVPN Static key V1-----"))
|
||
|
$input_errors[] = "The field 'TLS Authentication Key' does not appear to be valid";
|
||
|
if (!empty($_POST['defaultdomain']) &&
|
||
|
!is_hostname($_POST['defaultdomain'])) {
|
||
|
$input_errors[] = "DNS Default Domain must contain a valid DNS host or domain name";
|
||
|
}
|
||
|
if (!empty($_POST['dnsserver1']) && !is_ipaddr(trim($_POST['dnsserver1'])))
|
||
|
$input_errors[] = "The field 'DNS Server #1' must contain a valid IP address";
|
||
|
if (!empty($_POST['dnsserver2']) && !is_ipaddr(trim($_POST['dnsserver2'])))
|
||
| ... | ... | |
|
if (!empty($_POST['ntpserver2']) && !is_ipaddr(trim($_POST['ntpserver2'])))
|
||
|
$input_errors[] = "The field 'NTP Server #2' must contain a valid IP address";
|
||
|
if (!empty($_POST['nbtscope']) &&
|
||
|
!is_hostname($_POST['nbtscope'])) {
|
||
|
$input_errors[] = "NetBIOS Scope ID must contain a valid DNS host or domain name";
|
||
|
}
|
||
|
if (!empty($_POST['winsserver1']) && !is_ipaddr(trim($_POST['winsserver1'])))
|
||
|
$input_errors[] = "The field 'WINS Server #1' must contain a valid IP address";
|
||
|
if (!empty($_POST['winsserver2']) && !is_ipaddr(trim($_POST['winsserver2'])))
|
||
| ... | ... | |
|
if ($_POST['concurrentcon'] && !is_numeric($_POST['concurrentcon']))
|
||
|
$input_errors[] = "The field 'Concurrent connections' must be numeric.";
|
||
|
|
||
|
if ($_POST['connuserlimit'] && !is_numeric($_POST['connuserlimit']))
|
||
|
$input_errors[] = "The field 'Duplicate Connection Limit' must be numeric.";
|
||
|
if (empty($_POST['tunnelnet']))
|
||
|
$input_errors[] = "A 'Tunnel network' must be specified.";
|
||
|
if (count($input_errors) > 0) {
|
||
|
$savemsg = $input_errors[0];
|
||
|
$stepid = $stepid - 1;
|
||