diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-12-29 11:08:37 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-29 11:09:03 -0500 |
commit | d395af26da6df534543ebadb97f9e8c8e6bd3ef6 (patch) | |
tree | 21f8668bc6a001c1dbfd90ac5abbe69ca9090cd9 | |
parent | c399d0dd03fb4df3456418bfbe15162edd16c7d1 (diff) | |
download | pfsense-d395af26da6df534543ebadb97f9e8c8e6bd3ef6.zip pfsense-d395af26da6df534543ebadb97f9e8c8e6bd3ef6.tar.gz |
Final updates in support of hidden passwords
-rw-r--r-- | src/usr/local/www/classes/Form/Section.class.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/firewall_virtual_ip_edit.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/interfaces_ppps_edit.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/services_captiveportal_vouchers.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/services_pppoe_edit.php | 14 | ||||
-rw-r--r-- | src/usr/local/www/vpn_openvpn_client.php | 12 |
6 files changed, 23 insertions, 11 deletions
diff --git a/src/usr/local/www/classes/Form/Section.class.php b/src/usr/local/www/classes/Form/Section.class.php index 4ca5953..631562c 100644 --- a/src/usr/local/www/classes/Form/Section.class.php +++ b/src/usr/local/www/classes/Form/Section.class.php @@ -82,7 +82,7 @@ class Form_Section extends Form_Element $group->add($input); $confirm = clone $input; $confirm->setName($confirm->getName() . "_confirm"); - $confirm->setHelp("Confirm password"); + $confirm->setHelp("Confirm"); $group->add($confirm); $this->add($group); diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php index a98c967..a4a91f1 100644 --- a/src/usr/local/www/firewall_virtual_ip_edit.php +++ b/src/usr/local/www/firewall_virtual_ip_edit.php @@ -278,6 +278,8 @@ if ($_POST) { if ($_POST['password'] != DMYPWD) { $vipent['password'] = $_POST['password']; + } else { + $vipent['password'] = $a_vip[$id]['password']; } } diff --git a/src/usr/local/www/interfaces_ppps_edit.php b/src/usr/local/www/interfaces_ppps_edit.php index 1522963..0233eed 100644 --- a/src/usr/local/www/interfaces_ppps_edit.php +++ b/src/usr/local/www/interfaces_ppps_edit.php @@ -325,6 +325,8 @@ if ($_POST) { $ppp['username'] = $_POST['username']; if ($_POST['passwordfld'] != DMYPWD) { $ppp['password'] = base64_encode($_POST['passwordfld']); + } else { + $ppp['password'] = $a_ppps[$id]['password']; } $ppp['ondemand'] = $_POST['ondemand'] ? true : false; if (!empty($_POST['idletimeout'])) { diff --git a/src/usr/local/www/services_captiveportal_vouchers.php b/src/usr/local/www/services_captiveportal_vouchers.php index 46a6104..100e4cc 100644 --- a/src/usr/local/www/services_captiveportal_vouchers.php +++ b/src/usr/local/www/services_captiveportal_vouchers.php @@ -318,6 +318,8 @@ if ($_POST) { $newvoucher['vouchersyncusername'] = $_POST['vouchersyncusername']; if ($_POST['vouchersyncpass'] != DMYPWD ) { $newvoucher['vouchersyncpass'] = $_POST['vouchersyncpass']; + } else { + $newvoucher['vouchersyncpass'] = $config['voucher'][$cpzone]['vouchersyncpass']; } if ($newvoucher['vouchersyncpass'] && $newvoucher['vouchersyncusername'] && $newvoucher['vouchersyncport'] && $newvoucher['vouchersyncdbip']) { diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php index 03284bb..2392733 100644 --- a/src/usr/local/www/services_pppoe_edit.php +++ b/src/usr/local/www/services_pppoe_edit.php @@ -206,7 +206,9 @@ if ($_POST) { $pppoecfg['radius']['server'] = array(); $pppoecfg['radius']['server']['ip'] = $_POST['radiusserver']; - $pppoecfg['radius']['server']['secret'] = $_POST['radiussecret']; + if ($_POST['radiussecret'] != DMYPWD) { + $pppoecfg['radius']['server']['secret'] = $_POST['radiussecret']; + } $pppoecfg['radius']['server']['port'] = $_POST['radiusserverport']; $pppoecfg['radius']['server']['acctport'] = $_POST['radiusserveracctport']; } @@ -215,7 +217,9 @@ if ($_POST) { $pppoecfg['radius']['server2'] = array(); $pppoecfg['radius']['server2']['ip'] = $_POST['radiusserver2']; - $pppoecfg['radius']['server2']['secret2'] = $_POST['radiussecret2']; + if ($_POST['radiussecret2'] != DMYPWD) { + $pppoecfg['radius']['server2']['secret2'] = $_POST['radiussecret2']; + } $pppoecfg['radius']['server2']['port'] = $_POST['radiusserver2port']; $pppoecfg['radius']['server2']['acctport'] = $_POST['radiusserver2acctport']; } @@ -447,7 +451,7 @@ $group->setHelp('Standard ports are 1812 (authentication) and 1813 (accounting)' $section->add($group); -$section->addInput(new Form_Input( +$section->addPassword(new Form_Input( 'radiussecret', 'RADIUS primary shared secret', 'password', @@ -480,7 +484,7 @@ $group->setHelp('Standard ports are 1812 (authentication) and 1813 (accounting)' $section->add($group); -$section->addInput(new Form_Input( +$section->addPassword(new Form_Input( 'radiussecret2', 'RADIUS secondary shared secret', 'password', @@ -590,6 +594,7 @@ events.push(function() { disableInput('radacct_enable', hide); disableInput('radiusserver', hide); disableInput('radiussecret', hide); + disableInput('radiussecret_confirm', hide); disableInput('radiusserverport', hide); disableInput('radiusserveracctport', hide); disableInput('radiusissueips', hide); @@ -604,6 +609,7 @@ events.push(function() { function hide_radius2(hide) { disableInput('radiusserver2', hide); disableInput('radiussecret2', hide); + disableInput('radiussecret2_confirm', hide); disableInput('radiusserver2port', hide); disableInput('radiusserver2acctport', hide); } diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php index 6e6693a..5763585 100644 --- a/src/usr/local/www/vpn_openvpn_client.php +++ b/src/usr/local/www/vpn_openvpn_client.php @@ -136,11 +136,7 @@ if ($_GET['act'] == "new") { } global $simplefields; -if ($_POST['auth_pass'] == DMYPWD) { - $simplefields = array('auth_user'); -} else { - $simplefields = array('auth_user', 'auth_pass'); -} +$simplefields = array('auth_user', 'auth_pass'); if ($_GET['act'] == "edit") { @@ -345,7 +341,11 @@ if ($_POST) { $client = array(); foreach ($simplefields as $stat) { - update_if_changed($stat, $client[$stat], $_POST[$stat]); + if (($stat == 'auth_pass') && ($_POST[$stat] == DMYPWD)) { + $client[$stat] = $a_client[$id]['auth_pass']; + } else { + update_if_changed($stat, $client[$stat], $_POST[$stat]); + } } if ($vpnid) { |