changed names of session variables to prefix "conf_", fixed bug that prevented to change the password
This commit is contained in:
parent
94a721e9b3
commit
012d80f7a3
|
@ -56,31 +56,31 @@ domain:
|
|||
|
||||
|
||||
convsave, confmain, conflogin:
|
||||
- passwd: Eingabe von confmain
|
||||
- passwd1: Eingabe von confmain
|
||||
- passwd2: Eingabe von confmain
|
||||
- serverurl: Eingabe von confmain
|
||||
- cachetimeout: Eingabe von confmain
|
||||
- admins: Eingabe von confmain
|
||||
- suffusers: Eingabe von confmain
|
||||
- suffgroups: Eingabe von confmain
|
||||
- suffhosts: Eingabe von confmain
|
||||
- suffdomains: Eingabe von confmain
|
||||
- minUID: Eingabe von confmain
|
||||
- maxUID: Eingabe von confmain
|
||||
- minGID: Eingabe von confmain
|
||||
- maxGID: Eingabe von confmain
|
||||
- minMach: Eingabe von confmain
|
||||
- maxMach: Eingabe von confmain
|
||||
- usrlstattr: Eingabe von confmain
|
||||
- grplstattr: Eingabe von confmain
|
||||
- hstlstattr: Eingabe von confmain
|
||||
- maxlistentries: Eingabe von confmain
|
||||
- lang: Eingabe von confmain
|
||||
- scriptpath: Eingabe von confmain
|
||||
- scriptserver: Eingabe von confmain
|
||||
- samba3: Eingabe von confmain
|
||||
- filename: Dateiname des Profils
|
||||
- conf_passwd: Eingabe von confmain
|
||||
- conf_passwd1: Eingabe von confmain
|
||||
- conf_passwd2: Eingabe von confmain
|
||||
- conf_serverurl: Eingabe von confmain
|
||||
- conf_cachetimeout: Eingabe von confmain
|
||||
- conf_admins: Eingabe von confmain
|
||||
- conf_suffusers: Eingabe von confmain
|
||||
- conf_suffgroups: Eingabe von confmain
|
||||
- conf_suffhosts: Eingabe von confmain
|
||||
- conf_suffdomains: Eingabe von confmain
|
||||
- conf_minUID: Eingabe von confmain
|
||||
- conf_maxUID: Eingabe von confmain
|
||||
- conf_minGID: Eingabe von confmain
|
||||
- conf_maxGID: Eingabe von confmain
|
||||
- conf_minMach: Eingabe von confmain
|
||||
- conf_maxMach: Eingabe von confmain
|
||||
- conf_usrlstattr: Eingabe von confmain
|
||||
- conf_grplstattr: Eingabe von confmain
|
||||
- conf_hstlstattr: Eingabe von confmain
|
||||
- conf_maxlistentries: Eingabe von confmain
|
||||
- conf_lang: Eingabe von confmain
|
||||
- conf_scriptpath: Eingabe von confmain
|
||||
- conf_scriptserver: Eingabe von confmain
|
||||
- conf_samba3: Eingabe von confmain
|
||||
- conf_filename: Dateiname des Profils
|
||||
|
||||
|
||||
useredit:
|
||||
|
|
|
@ -33,30 +33,30 @@ session_save_path("../../sess");
|
|||
setlanguage();
|
||||
|
||||
// remove settings from session
|
||||
unset($_SESSION['passwd']);
|
||||
unset($_SESSION['passwd1']);
|
||||
unset($_SESSION['passwd2']);
|
||||
unset($_SESSION['serverurl']);
|
||||
unset($_SESSION['admins']);
|
||||
unset($_SESSION['suffusers']);
|
||||
unset($_SESSION['suffgroups']);
|
||||
unset($_SESSION['suffhosts']);
|
||||
unset($_SESSION['minUID']);
|
||||
unset($_SESSION['maxUID']);
|
||||
unset($_SESSION['minGID']);
|
||||
unset($_SESSION['maxGID']);
|
||||
unset($_SESSION['minMach']);
|
||||
unset($_SESSION['maxMach']);
|
||||
unset($_SESSION['usrlstattr']);
|
||||
unset($_SESSION['grplstattr']);
|
||||
unset($_SESSION['hstlstattr']);
|
||||
unset($_SESSION['maxlistentries']);
|
||||
unset($_SESSION['lang']);
|
||||
unset($_SESSION['scriptpath']);
|
||||
unset($_SESSION['scriptserver']);
|
||||
unset($_SESSION['samba3']);
|
||||
unset($_SESSION['domainSID']);
|
||||
unset($_SESSION['filename']);
|
||||
unset($_SESSION['conf_passwd']);
|
||||
unset($_SESSION['conf_passwd1']);
|
||||
unset($_SESSION['conf_passwd2']);
|
||||
unset($_SESSION['conf_serverurl']);
|
||||
unset($_SESSION['conf_admins']);
|
||||
unset($_SESSION['conf_suffusers']);
|
||||
unset($_SESSION['conf_suffgroups']);
|
||||
unset($_SESSION['conf_suffhosts']);
|
||||
unset($_SESSION['conf_minUID']);
|
||||
unset($_SESSION['conf_maxUID']);
|
||||
unset($_SESSION['conf_minGID']);
|
||||
unset($_SESSION['conf_maxGID']);
|
||||
unset($_SESSION['conf_minMach']);
|
||||
unset($_SESSION['conf_maxMach']);
|
||||
unset($_SESSION['conf_usrlstattr']);
|
||||
unset($_SESSION['conf_grplstattr']);
|
||||
unset($_SESSION['conf_hstlstattr']);
|
||||
unset($_SESSION['conf_maxlistentries']);
|
||||
unset($_SESSION['conf_lang']);
|
||||
unset($_SESSION['conf_scriptpath']);
|
||||
unset($_SESSION['conf_scriptserver']);
|
||||
unset($_SESSION['conf_samba3']);
|
||||
unset($_SESSION['conf_domainSID']);
|
||||
unset($_SESSION['conf_filename']);
|
||||
|
||||
echo $_SESSION['header'];
|
||||
|
||||
|
|
|
@ -38,33 +38,33 @@ if ($_POST['back'] || $_POST['submitconf']){
|
|||
if ($_POST['submitconf']){
|
||||
// save HTTP-POST variables in session
|
||||
// get data if register_globals is off
|
||||
if ($_POST['passwd']) $_SESSION['passwd'] = $_POST['passwd'];
|
||||
if ($_POST['passwd1']) $_SESSION['passwd1'] = $_POST['passwd1'];
|
||||
if ($_POST['passwd2']) $_SESSION['passwd2'] = $_POST['passwd2'];
|
||||
if ($_POST['serverurl']) $_SESSION['serverurl'] = $_POST['serverurl'];
|
||||
if (isset($_POST['cachetimeout'])) $_SESSION['cachetimeout'] = $_POST['cachetimeout'];
|
||||
if ($_POST['admins']) $_SESSION['admins'] = $_POST['admins'];
|
||||
if ($_POST['suffusers']) $_SESSION['suffusers'] = $_POST['suffusers'];
|
||||
if ($_POST['suffgroups']) $_SESSION['suffgroups'] = $_POST['suffgroups'];
|
||||
if ($_POST['suffhosts']) $_SESSION['suffhosts'] = $_POST['suffhosts'];
|
||||
if ($_POST['suffdomains']) $_SESSION['suffdomains'] = $_POST['suffdomains'];
|
||||
if (isset($_POST['minUID'])) $_SESSION['minUID'] = $_POST['minUID'];
|
||||
if ($_POST['maxUID']) $_SESSION['maxUID'] = $_POST['maxUID'];
|
||||
if (isset($_POST['minGID'])) $_SESSION['minGID'] = $_POST['minGID'];
|
||||
if ($_POST['maxGID']) $_SESSION['maxGID'] = $_POST['maxGID'];
|
||||
if (isset($_POST['minMach'])) $_SESSION['minMach'] = $_POST['minMach'];
|
||||
if ($_POST['maxMach']) $_SESSION['maxMach'] = $_POST['maxMach'];
|
||||
if ($_POST['usrlstattr']) $_SESSION['usrlstattr'] = $_POST['usrlstattr'];
|
||||
if ($_POST['grplstattr']) $_SESSION['grplstattr'] = $_POST['grplstattr'];
|
||||
if ($_POST['hstlstattr']) $_SESSION['hstlstattr'] = $_POST['hstlstattr'];
|
||||
if ($_POST['maxlistentries']) $_SESSION['maxlistentries'] = $_POST['maxlistentries'];
|
||||
if ($_POST['lang']) $_SESSION['lang'] = $_POST['lang'];
|
||||
if ($_POST['samba3']) $_SESSION['samba3'] = $_POST['samba3'];
|
||||
if ($_POST['scriptpath']) $_SESSION['scriptpath'] = $_POST['scriptpath'];
|
||||
else $_SESSION['scriptpath'] = "";
|
||||
if ($_POST['scriptserver']) $_SESSION['scriptserver'] = $_POST['scriptserver'];
|
||||
else $_SESSION['scriptserver'] = "";
|
||||
if ($_POST['filename']) $_SESSION['filename'] = $_POST['filename'];
|
||||
if ($_POST['passwd']) $_SESSION['conf_passwd'] = $_POST['passwd'];
|
||||
if ($_POST['passwd1']) $_SESSION['conf_passwd1'] = $_POST['passwd1'];
|
||||
if ($_POST['passwd2']) $_SESSION['conf_passwd2'] = $_POST['passwd2'];
|
||||
if ($_POST['serverurl']) $_SESSION['conf_serverurl'] = $_POST['serverurl'];
|
||||
if (isset($_POST['cachetimeout'])) $_SESSION['conf_cachetimeout'] = $_POST['cachetimeout'];
|
||||
if ($_POST['admins']) $_SESSION['conf_admins'] = $_POST['admins'];
|
||||
if ($_POST['suffusers']) $_SESSION['conf_suffusers'] = $_POST['suffusers'];
|
||||
if ($_POST['suffgroups']) $_SESSION['conf_suffgroups'] = $_POST['suffgroups'];
|
||||
if ($_POST['suffhosts']) $_SESSION['conf_suffhosts'] = $_POST['suffhosts'];
|
||||
if ($_POST['suffdomains']) $_SESSION['conf_suffdomains'] = $_POST['suffdomains'];
|
||||
if (isset($_POST['minUID'])) $_SESSION['conf_minUID'] = $_POST['minUID'];
|
||||
if ($_POST['maxUID']) $_SESSION['conf_maxUID'] = $_POST['maxUID'];
|
||||
if (isset($_POST['minGID'])) $_SESSION['conf_minGID'] = $_POST['minGID'];
|
||||
if ($_POST['maxGID']) $_SESSION['conf_maxGID'] = $_POST['maxGID'];
|
||||
if (isset($_POST['minMach'])) $_SESSION['conf_minMach'] = $_POST['minMach'];
|
||||
if ($_POST['maxMach']) $_SESSION['conf_maxMach'] = $_POST['maxMach'];
|
||||
if ($_POST['usrlstattr']) $_SESSION['conf_usrlstattr'] = $_POST['usrlstattr'];
|
||||
if ($_POST['grplstattr']) $_SESSION['conf_grplstattr'] = $_POST['grplstattr'];
|
||||
if ($_POST['hstlstattr']) $_SESSION['conf_hstlstattr'] = $_POST['hstlstattr'];
|
||||
if ($_POST['maxlistentries']) $_SESSION['conf_maxlistentries'] = $_POST['maxlistentries'];
|
||||
if ($_POST['lang']) $_SESSION['conf_lang'] = $_POST['lang'];
|
||||
if ($_POST['samba3']) $_SESSION['conf_samba3'] = $_POST['samba3'];
|
||||
if ($_POST['scriptpath']) $_SESSION['conf_scriptpath'] = $_POST['scriptpath'];
|
||||
else $_SESSION['conf_scriptpath'] = "";
|
||||
if ($_POST['scriptserver']) $_SESSION['conf_scriptserver'] = $_POST['scriptserver'];
|
||||
else $_SESSION['conf_scriptserver'] = "";
|
||||
if ($_POST['filename']) $_SESSION['conf_filename'] = $_POST['filename'];
|
||||
metaRefresh("confsave.php");
|
||||
}
|
||||
// back to login
|
||||
|
@ -322,12 +322,12 @@ echo ("<table border=0>\n");
|
|||
// new password
|
||||
echo ("<tr><td bgcolor=\"red\" align=\"right\"><b>".
|
||||
_("New Password") . ": </b></td>".
|
||||
"<td bgcolor=\"red\" align=\"left\"><input type=\"password\" name=\"pass1\"></td>\n");
|
||||
"<td bgcolor=\"red\" align=\"left\"><input type=\"password\" name=\"passwd1\"></td>\n");
|
||||
echo ("<td rowspan=2><a href=\"../help.php?HelpNumber=212\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
|
||||
// reenter password
|
||||
echo ("<tr><td bgcolor=\"red\" align=\"right\"><b>".
|
||||
_("Reenter Password") . ": </b></td>".
|
||||
"<td bgcolor=\"red\" align=\"left\"><input type=\"password\" name=\"pass2\"></td></tr>\n");
|
||||
"<td bgcolor=\"red\" align=\"left\"><input type=\"password\" name=\"passwd2\"></td></tr>\n");
|
||||
echo ("</table>\n");
|
||||
echo ("</fieldset>\n");
|
||||
echo ("<p></p>\n");
|
||||
|
|
|
@ -31,34 +31,34 @@ session_save_path("../../sess");
|
|||
|
||||
setlanguage();
|
||||
|
||||
$conf = new Config($_SESSION['filename']);
|
||||
$conf = new Config($_SESSION['conf_filename']);
|
||||
|
||||
// get data from session
|
||||
if ($_SESSION['passwd']) $passwd = $_SESSION['passwd'];
|
||||
if ($_SESSION['passwd1']) $passwd1 = $_SESSION['passwd1'];
|
||||
if ($_SESSION['passwd2']) $passwd2 = $_SESSION['passwd2'];
|
||||
if ($_SESSION['serverurl']) $serverurl = $_SESSION['serverurl'];
|
||||
if (isset($_SESSION['cachetimeout'])) $cachetimeout = $_SESSION['cachetimeout'];
|
||||
if ($_SESSION['admins']) $admins = $_SESSION['admins'];
|
||||
if ($_SESSION['suffusers']) $suffusers = $_SESSION['suffusers'];
|
||||
if ($_SESSION['suffgroups']) $suffgroups = $_SESSION['suffgroups'];
|
||||
if ($_SESSION['suffhosts']) $suffhosts = $_SESSION['suffhosts'];
|
||||
if ($_SESSION['suffdomains']) $suffdomains = $_SESSION['suffdomains'];
|
||||
if (isset($_SESSION['minUID'])) $minUID = $_SESSION['minUID'];
|
||||
if ($_SESSION['maxUID']) $maxUID = $_SESSION['maxUID'];
|
||||
if (isset($_SESSION['minGID'])) $minGID = $_SESSION['minGID'];
|
||||
if ($_SESSION['maxGID']) $maxGID = $_SESSION['maxGID'];
|
||||
if (isset($_SESSION['minMach'])) $minMach = $_SESSION['minMach'];
|
||||
if ($_SESSION['maxMach']) $maxMach = $_SESSION['maxMach'];
|
||||
if ($_SESSION['usrlstattr']) $usrlstattr = $_SESSION['usrlstattr'];
|
||||
if ($_SESSION['grplstattr']) $grplstattr = $_SESSION['grplstattr'];
|
||||
if ($_SESSION['hstlstattr']) $hstlstattr = $_SESSION['hstlstattr'];
|
||||
if ($_SESSION['maxlistentries']) $maxlistentries = $_SESSION['maxlistentries'];
|
||||
if ($_SESSION['lang']) $lang = $_SESSION['lang'];
|
||||
if ($_SESSION['scriptpath']) $scriptpath = $_SESSION['scriptpath'];
|
||||
if ($_SESSION['scriptserver']) $scriptserver = $_SESSION['scriptserver'];
|
||||
if ($_SESSION['samba3']) $samba3 = $_SESSION['samba3'];
|
||||
if ($_SESSION['filename']) $filename = $_SESSION['filename'];
|
||||
if ($_SESSION['conf_passwd']) $passwd = $_SESSION['conf_passwd'];
|
||||
if ($_SESSION['conf_passwd1']) $passwd1 = $_SESSION['conf_passwd1'];
|
||||
if ($_SESSION['conf_passwd2']) $passwd2 = $_SESSION['conf_passwd2'];
|
||||
if ($_SESSION['conf_serverurl']) $serverurl = $_SESSION['conf_serverurl'];
|
||||
if (isset($_SESSION['conf_cachetimeout'])) $cachetimeout = $_SESSION['conf_cachetimeout'];
|
||||
if ($_SESSION['conf_admins']) $admins = $_SESSION['conf_admins'];
|
||||
if ($_SESSION['conf_suffusers']) $suffusers = $_SESSION['conf_suffusers'];
|
||||
if ($_SESSION['conf_suffgroups']) $suffgroups = $_SESSION['conf_suffgroups'];
|
||||
if ($_SESSION['conf_suffhosts']) $suffhosts = $_SESSION['conf_suffhosts'];
|
||||
if ($_SESSION['conf_suffdomains']) $suffdomains = $_SESSION['conf_suffdomains'];
|
||||
if (isset($_SESSION['conf_minUID'])) $minUID = $_SESSION['conf_minUID'];
|
||||
if ($_SESSION['conf_maxUID']) $maxUID = $_SESSION['conf_maxUID'];
|
||||
if (isset($_SESSION['conf_minGID'])) $minGID = $_SESSION['conf_minGID'];
|
||||
if ($_SESSION['conf_maxGID']) $maxGID = $_SESSION['conf_maxGID'];
|
||||
if (isset($_SESSION['conf_minMach'])) $minMach = $_SESSION['conf_minMach'];
|
||||
if ($_SESSION['conf_maxMach']) $maxMach = $_SESSION['conf_maxMach'];
|
||||
if ($_SESSION['conf_usrlstattr']) $usrlstattr = $_SESSION['conf_usrlstattr'];
|
||||
if ($_SESSION['conf_grplstattr']) $grplstattr = $_SESSION['conf_grplstattr'];
|
||||
if ($_SESSION['conf_hstlstattr']) $hstlstattr = $_SESSION['conf_hstlstattr'];
|
||||
if ($_SESSION['conf_maxlistentries']) $maxlistentries = $_SESSION['conf_maxlistentries'];
|
||||
if ($_SESSION['conf_lang']) $lang = $_SESSION['conf_lang'];
|
||||
if ($_SESSION['conf_scriptpath']) $scriptpath = $_SESSION['conf_scriptpath'];
|
||||
if ($_SESSION['conf_scriptserver']) $scriptserver = $_SESSION['conf_scriptserver'];
|
||||
if ($_SESSION['conf_samba3']) $samba3 = $_SESSION['conf_samba3'];
|
||||
if ($_SESSION['conf_filename']) $filename = $_SESSION['conf_filename'];
|
||||
|
||||
// check if password is correct
|
||||
// if not: load login page
|
||||
|
@ -213,15 +213,18 @@ $conf->set_scriptserver($scriptserver);
|
|||
|
||||
|
||||
// check if password was changed
|
||||
if ($pass1 != $pass2) {
|
||||
echo ("<b>" . _("Passwords are different!") . "</b>");
|
||||
exit;
|
||||
}
|
||||
// set new password
|
||||
if ($pass1 != "") {
|
||||
$conf->set_Passwd($pass1);
|
||||
echo ("<b>" . _("Password changed!") . "</b><br><br>");
|
||||
if ($passwd1) {
|
||||
if ($passwd1 != $passwd2) {
|
||||
echo ("<b>" . _("Passwords are different!") . "</b>");
|
||||
exit;
|
||||
}
|
||||
// set new password
|
||||
if ($passwd1 != "") {
|
||||
$conf->set_Passwd($passwd1);
|
||||
echo ("<b>" . _("Password changed!") . "</b><br><br>");
|
||||
}
|
||||
}
|
||||
|
||||
// save settings and display new settings
|
||||
$conf->save();
|
||||
echo ("<b>" . _("The following settings were saved to profile:") . " </b>" . $filename . "<br><br>");
|
||||
|
@ -231,30 +234,30 @@ echo ("<br><br><br><br><br><a href=\"../login.php\" target=\"_top\">" . _("Back
|
|||
echo("</body></html>");
|
||||
|
||||
// remove settings from session
|
||||
unset($_SESSION['passwd']);
|
||||
unset($_SESSION['passwd1']);
|
||||
unset($_SESSION['passwd2']);
|
||||
unset($_SESSION['serverurl']);
|
||||
unset($_SESSION['cachetimeout']);
|
||||
unset($_SESSION['admins']);
|
||||
unset($_SESSION['suffusers']);
|
||||
unset($_SESSION['suffgroups']);
|
||||
unset($_SESSION['suffhosts']);
|
||||
unset($_SESSION['suffdomains']);
|
||||
unset($_SESSION['minUID']);
|
||||
unset($_SESSION['maxUID']);
|
||||
unset($_SESSION['minGID']);
|
||||
unset($_SESSION['maxGID']);
|
||||
unset($_SESSION['minMach']);
|
||||
unset($_SESSION['maxMach']);
|
||||
unset($_SESSION['usrlstattr']);
|
||||
unset($_SESSION['grplstattr']);
|
||||
unset($_SESSION['hstlstattr']);
|
||||
unset($_SESSION['maxlistentries']);
|
||||
unset($_SESSION['lang']);
|
||||
unset($_SESSION['scriptpath']);
|
||||
unset($_SESSION['scriptserver']);
|
||||
unset($_SESSION['samba3']);
|
||||
unset($_SESSION['filename']);
|
||||
unset($_SESSION['conf_passwd']);
|
||||
unset($_SESSION['conf_passwd1']);
|
||||
unset($_SESSION['conf_passwd2']);
|
||||
unset($_SESSION['conf_serverurl']);
|
||||
unset($_SESSION['conf_cachetimeout']);
|
||||
unset($_SESSION['conf_admins']);
|
||||
unset($_SESSION['conf_suffusers']);
|
||||
unset($_SESSION['conf_suffgroups']);
|
||||
unset($_SESSION['conf_suffhosts']);
|
||||
unset($_SESSION['conf_suffdomains']);
|
||||
unset($_SESSION['conf_minUID']);
|
||||
unset($_SESSION['conf_maxUID']);
|
||||
unset($_SESSION['conf_minGID']);
|
||||
unset($_SESSION['conf_maxGID']);
|
||||
unset($_SESSION['conf_minMach']);
|
||||
unset($_SESSION['conf_maxMach']);
|
||||
unset($_SESSION['conf_usrlstattr']);
|
||||
unset($_SESSION['conf_grplstattr']);
|
||||
unset($_SESSION['conf_hstlstattr']);
|
||||
unset($_SESSION['conf_maxlistentries']);
|
||||
unset($_SESSION['conf_lang']);
|
||||
unset($_SESSION['conf_scriptpath']);
|
||||
unset($_SESSION['conf_scriptserver']);
|
||||
unset($_SESSION['conf_samba3']);
|
||||
unset($_SESSION['conf_filename']);
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue