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/interfaces.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/interfaces.php')
-rw-r--r-- | src/usr/local/www/interfaces.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 104a1bf..547e93f 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -947,6 +947,19 @@ if ($_POST['apply']) { } } } + + if ($_POST['ppp_password'] != $_POST['ppp_password_confirm']) { + $input_errors[] = gettext("PPP Password and confirmed password must match!"); + } + + if ($_POST['pppoe_password'] != $_POST['ppoep_password_confirm']) { + $input_errors[] = gettext("PPPoE Password and confirmed password must match!"); + } + + if ($_POST['pptp_password'] != $_POST['pptp_password_confirm']) { + $input_errors[] = gettext("PTPP Password and confirmed password must match!"); + } + if (!$input_errors) { // These 3 fields can be a list of multiple data items when used for MLPPP. // The UI in this code only processes the first of the list, so save the data here then we can preserve any other entries. @@ -2452,7 +2465,7 @@ $section->addInput(new Form_Input( $pconfig['ppp_username'] )); -$section->addInput(new Form_Input( +$section->addPassword(new Form_Input( 'ppp_password', 'Password', 'password', @@ -2518,7 +2531,7 @@ $section->addInput(new Form_Input( $pconfig['pppoe_username'] )); -$section->addInput(new Form_Input( +$section->addPassword(new Form_Input( 'pppoe_password', 'Password', 'password', @@ -2649,7 +2662,7 @@ $section->addInput(new Form_Input( $pconfig['pptp_username'] )); -$section->addInput(new Form_Input( +$section->addPassword(new Form_Input( 'pptp_password', 'Password', 'password', |