summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-28 16:59:54 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-28 16:59:54 -0500
commit76d6d92535ad26d2b951a433658d5de62c62a15f (patch)
treef281570f1c8acc7d6a7db326efedf36130eae98c /src/usr/local/www/interfaces.php
parentc8b10b4ce59161e21a93786d04237ad3f330178a (diff)
downloadpfsense-76d6d92535ad26d2b951a433658d5de62c62a15f.zip
pfsense-76d6d92535ad26d2b951a433658d5de62c62a15f.tar.gz
FInished password hiding logic by ensuring $_POST['password'] != DMYPWD before updating
Diffstat (limited to 'src/usr/local/www/interfaces.php')
-rw-r--r--src/usr/local/www/interfaces.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index 547e93f..db69970 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -1138,7 +1138,9 @@ if ($_POST['apply']) {
$a_ppps[$pppid]['if'] = $_POST['type'].$_POST['ptpid'];
$a_ppps[$pppid]['ports'] = $_POST['port'];
$a_ppps[$pppid]['username'] = $_POST['ppp_username'];
- $a_ppps[$pppid]['password'] = base64_encode($_POST['ppp_password']);
+ if ($_POST['ppp_password'] != DMYPWD) {
+ $a_ppps[$pppid]['password'] = base64_encode($_POST['ppp_password']);
+ }
$a_ppps[$pppid]['phone'] = $_POST['phone'];
$a_ppps[$pppid]['apn'] = $_POST['apn'];
$wancfg['if'] = $_POST['type'] . $_POST['ptpid'];
@@ -1155,7 +1157,9 @@ if ($_POST['apply']) {
$a_ppps[$pppid]['ports'] = $wancfg['if'];
}
$a_ppps[$pppid]['username'] = $_POST['pppoe_username'];
- $a_ppps[$pppid]['password'] = base64_encode($_POST['pppoe_password']);
+ if ($_POST['pppoe_password'] != DMYPWD) {
+ $a_ppps[$pppid]['password'] = base64_encode($_POST['pppoe_password']);
+ }
if (!empty($_POST['provider'])) {
$a_ppps[$pppid]['provider'] = $_POST['provider'];
} else {
@@ -1191,7 +1195,9 @@ if ($_POST['apply']) {
$a_ppps[$pppid]['ports'] = $wancfg['if'];
}
$a_ppps[$pppid]['username'] = $_POST['pptp_username'];
- $a_ppps[$pppid]['password'] = base64_encode($_POST['pptp_password']);
+ if ($_POST['pptp_password'] != DMYPWD) {
+ $a_ppps[$pppid]['password'] = base64_encode($_POST['pptp_password']);
+ }
// Replace the first (0) entry with the posted data. Preserve any other entries that might be there.
$poriginal['pptp_localip'][0] = $_POST['pptp_local0'];
$a_ppps[$pppid]['localip'] = implode(',', $poriginal['pptp_localip']);
OpenPOWER on IntegriCloud