diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-12-28 16:11:17 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-28 16:11:17 -0500 |
commit | c8b10b4ce59161e21a93786d04237ad3f330178a (patch) | |
tree | 9e696532f61abc22b52ebb86d678ec7c1ac356c4 /src/usr/local/www/vpn_openvpn_client.php | |
parent | 690026d8256f15fd3b1df97ca1cba8f4815e425e (diff) | |
download | pfsense-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.php | 12 |
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', |