diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-12-28 16:59:54 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-12-28 16:59:54 -0500 |
commit | 76d6d92535ad26d2b951a433658d5de62c62a15f (patch) | |
tree | f281570f1c8acc7d6a7db326efedf36130eae98c /src/usr/local/www/vpn_openvpn_client.php | |
parent | c8b10b4ce59161e21a93786d04237ad3f330178a (diff) | |
download | pfsense-76d6d92535ad26d2b951a433658d5de62c62a15f.zip pfsense-76d6d92535ad26d2b951a433658d5de62c62a15f.tar.gz |
FInished password hiding logic by ensuring $_POST['password'] != DMYPWD before updating
Diffstat (limited to 'src/usr/local/www/vpn_openvpn_client.php')
-rw-r--r-- | src/usr/local/www/vpn_openvpn_client.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php index 63e52b1..6e6693a 100644 --- a/src/usr/local/www/vpn_openvpn_client.php +++ b/src/usr/local/www/vpn_openvpn_client.php @@ -136,7 +136,11 @@ if ($_GET['act'] == "new") { } global $simplefields; -$simplefields = array('auth_user', 'auth_pass'); +if ($_POST['auth_pass'] == DMYPWD) { + $simplefields = array('auth_user'); +} else { + $simplefields = array('auth_user', 'auth_pass'); +} if ($_GET['act'] == "edit") { @@ -364,7 +368,9 @@ if ($_POST) { $client['proxy_port'] = $pconfig['proxy_port']; $client['proxy_authtype'] = $pconfig['proxy_authtype']; $client['proxy_user'] = $pconfig['proxy_user']; - $client['proxy_passwd'] = $pconfig['proxy_passwd']; + if ($pconfig['proxy_passwd'] != DMYPWD) { + $client['proxy_passwd'] = $pconfig['proxy_passwd']; + } $client['description'] = $pconfig['description']; $client['mode'] = $pconfig['mode']; $client['custom_options'] = str_replace("\r\n", "\n", $pconfig['custom_options']); |