diff options
author | Ermal <eri@pfsense.org> | 2013-12-20 22:08:34 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-12-20 22:08:34 +0000 |
commit | aa205c3b69bf76b1565fd42dba83c7637212f793 (patch) | |
tree | f04ba2d5e093bd36f0e128690e72ae538b8104de /usr/local/www/system_usermanager_passwordmg.php | |
parent | cc2630208cc31ac3a19c185036a4b589d125e99a (diff) | |
download | pfsense-aa205c3b69bf76b1565fd42dba83c7637212f793.zip pfsense-aa205c3b69bf76b1565fd42dba83c7637212f793.tar.gz |
Rmoeve register_long_arrays from php.ini and from php code the use of HTTP_*_VARS as its deprecated and luckily low use in pfSense to win memory and compativility
Diffstat (limited to 'usr/local/www/system_usermanager_passwordmg.php')
-rw-r--r-- | usr/local/www/system_usermanager_passwordmg.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr/local/www/system_usermanager_passwordmg.php b/usr/local/www/system_usermanager_passwordmg.php index 10ff645..a35a8a47 100644 --- a/usr/local/www/system_usermanager_passwordmg.php +++ b/usr/local/www/system_usermanager_passwordmg.php @@ -54,9 +54,12 @@ if (isset($_POST['save'])) { $input_errors[] = gettext("The passwords do not match."); if (!$input_errors) { + if (!session_id()) + session_start(); // all values are okay --> saving changes - $config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]['password'] = crypt(trim($_POST['passwordfld1'])); - local_user_set($config['system']['user'][$userindex[$HTTP_SERVER_VARS['AUTH_USER']]]); + $config['system']['user'][$userindex[$_SESSION['Username']]]['password'] = crypt(trim($_POST['passwordfld1'])); + local_user_set($config['system']['user'][$userindex[$_SESSION['Username']]]); + session_commit(); write_config(); @@ -101,7 +104,11 @@ if ($islocal == false) { <form action="system_usermanager_passwordmg.php" method="post" name="iform" id="iform"> <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <tr> - <td colspan="2" valign="top" class="listtopic"><?=$HTTP_SERVER_VARS['AUTH_USER']?>'s <?=gettext("Password"); ?></td> +<?php if (!session_id()) + session_start(); +?> + <td colspan="2" valign="top" class="listtopic"><?=$_SESSION['Username']?>'s <?=gettext("Password"); ?></td> +<?php session_commit(); ?> </tr> <tr> <td width="22%" valign="top" class="vncell" rowspan="2"><?=gettext("Password"); ?></td> |