diff options
author | jim-p <jimp@pfsense.org> | 2017-01-04 15:28:28 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-01-04 15:28:28 -0500 |
commit | e2f0ad13b5c1305c03f5104819ec096d077e496b (patch) | |
tree | 7c8ee62671300521069eace5d53003d1956ef70d /src/usr/local/www/vpn_openvpn_client.php | |
parent | fa351dd3c13e65dfabfb0f2ac2ed72b332276892 (diff) | |
download | pfsense-e2f0ad13b5c1305c03f5104819ec096d077e496b.zip pfsense-e2f0ad13b5c1305c03f5104819ec096d077e496b.tar.gz |
Some improvements to the NCP validation. Ticket #7072
Diffstat (limited to 'src/usr/local/www/vpn_openvpn_client.php')
-rw-r--r-- | src/usr/local/www/vpn_openvpn_client.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php index 197452d..2e7b554 100644 --- a/src/usr/local/www/vpn_openvpn_client.php +++ b/src/usr/local/www/vpn_openvpn_client.php @@ -320,9 +320,11 @@ if ($_POST) { /* If we are not in shared key mode, then we need the CA/Cert. */ if ($pconfig['mode'] != "p2p_shared_key") { - foreach ($pconfig['ncp-ciphers'] as $ncpc) { - if (!in_array($ncpc, $cipher_validation_list)) { - $input_errors[] = gettext("One or more of the selected NCP Algorithms is not valid."); + if (($pconfig['ncp_enable'] != "disabled") && !empty($pconfig['ncp-ciphers']) && is_array($pconfig['ncp-ciphers'])) { + foreach ($pconfig['ncp-ciphers'] as $ncpc) { + if (!in_array($ncpc, $cipher_validation_list)) { + $input_errors[] = gettext("One or more of the selected NCP Algorithms is not valid."); + } } } $reqdfields = explode(" ", "caref"); |