summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/vpn_openvpn_client.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-28 16:11:17 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-28 16:11:17 -0500
commitc8b10b4ce59161e21a93786d04237ad3f330178a (patch)
tree9e696532f61abc22b52ebb86d678ec7c1ac356c4 /src/usr/local/www/vpn_openvpn_client.php
parent690026d8256f15fd3b1df97ca1cba8f4815e425e (diff)
downloadpfsense-c8b10b4ce59161e21a93786d04237ad3f330178a.zip
pfsense-c8b10b4ce59161e21a93786d04237ad3f330178a.tar.gz
Added new addPassword method and password == password_confirm validation where required.
Diffstat (limited to 'src/usr/local/www/vpn_openvpn_client.php')
-rw-r--r--src/usr/local/www/vpn_openvpn_client.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php
index 2fe4fca..63e52b1 100644
--- a/src/usr/local/www/vpn_openvpn_client.php
+++ b/src/usr/local/www/vpn_openvpn_client.php
@@ -267,6 +267,10 @@ if ($_POST) {
if (empty($pconfig['proxy_user']) || empty($pconfig['proxy_passwd'])) {
$input_errors[] = gettext("User name and password are required for proxy with authentication.");
}
+
+ if ($pconfig['proxy_passwd'] != $pconfig['proxy_passwd_confirm']) {
+ $input_errors[] = gettext("Password and confirmation must match.");
+ }
}
}
@@ -328,6 +332,10 @@ if ($_POST) {
$input_errors[] = gettext("If no Client Certificate is selected, a username and/or password must be entered.");
}
+ if ($pconfig['auth_pass'] != $pconfig['auth_pass_confirm']) {
+ $input_errors[] = gettext("Password and confirmation must match.");
+ }
+
if (!$input_errors) {
$client = array();
@@ -508,7 +516,7 @@ if ($act=="new" || $act=="edit"):
$pconfig['proxy_user']
));
- $section->addInput(new Form_Input(
+ $section->addPassword(new Form_Input(
'proxy_passwd',
'Password',
'password',
@@ -541,7 +549,7 @@ if ($act=="new" || $act=="edit"):
$pconfig['auth_user']
))->setHelp('Leave empty when no user name is needed');
- $section->addInput(new Form_Input(
+ $section->addPassword(new Form_Input(
'auth_pass',
'Password',
'password',
OpenPOWER on IntegriCloud