mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix OpenVPN server validation logic. It was failing if you tried to save a shared key server instance with an existing shared key.
This commit is contained in:
parent
520b1e07b0
commit
21c776dd85
@ -244,12 +244,14 @@ if ($_POST) {
|
||||
if ($pconfig['maxclients'] && !is_numeric($pconfig['maxclients']))
|
||||
$input_errors[] = "The field 'Concurrent connections' must be numeric.";
|
||||
|
||||
if (!$tls_mode && !$pconfig['autokey_enable']) {
|
||||
$reqdfields = array('shared_key');
|
||||
$reqdfieldsn = array('Shared key');
|
||||
} else {
|
||||
/* If we are not in shared key mode, then we need the CA/Cert. */
|
||||
if ($pconfig['mode'] != "p2p_shared_key") {
|
||||
$reqdfields = explode(" ", "caref certref");
|
||||
$reqdfieldsn = explode(",", "Certificate Authority,Certificate");;
|
||||
} elseif (!$pconfig['autokey_enable']) {
|
||||
/* We only need the shared key filled in if we are in shared key mode and autokey is not selected. */
|
||||
$reqdfields = array('shared_key');
|
||||
$reqdfieldsn = array('Shared key');
|
||||
}
|
||||
|
||||
$reqdfields[] = 'tunnel_network';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user