added support for register_globals off

This commit is contained in:
Roland Gruber 2003-05-02 16:52:19 +00:00
parent 7c43b5d9d0
commit f3f1deb25b
2 changed files with 27 additions and 5 deletions

View File

@ -28,6 +28,9 @@ $Id$
session_save_path("../../sess"); session_save_path("../../sess");
session_start(); session_start();
// get password if register_globals is off
if ($_POST['passwd']) $passwd = $_POST['passwd'];
// check if password was entered // check if password was entered
// if not: load login page // if not: load login page
if (! $passwd) { if (! $passwd) {

View File

@ -31,6 +31,25 @@ session_start();
include_once ('../../lib/config.inc'); include_once ('../../lib/config.inc');
$conf = new Config(); $conf = new Config();
// get data if register_globals is off
if ($_POST['passwd']) $passwd = $_POST['passwd'];
if ($_POST['passwd1']) $passwd1 = $_POST['passwd1'];
if ($_POST['passwd2']) $passwd2 = $_POST['passwd2'];
if ($_POST['serverurl']) $serverurl = $_POST['serverurl'];
if ($_POST['admins']) $admins = $_POST['admins'];
if ($_POST['suffusers']) $suffusers = $_POST['suffusers'];
if ($_POST['suffgroups']) $suffgroups = $_POST['suffgroups'];
if ($_POST['suffhosts']) $suffhosts = $_POST['suffhosts'];
if ($_POST['minUID']) $minUID = $_POST['minUID'];
if ($_POST['maxUID']) $maxUID = $_POST['maxUID'];
if ($_POST['minGID']) $minGID = $_POST['minGID'];
if ($_POST['maxGID']) $maxGID = $_POST['maxGID'];
if ($_POST['minMach']) $minMach = $_POST['minMach'];
if ($_POST['maxMach']) $maxMach = $_POST['maxMach'];
if ($_POST['usrlstattr']) $usrlstattr = $_POST['usrlstattr'];
if ($_POST['grplstattr']) $grplstattr = $_POST['grplstattr'];
if ($_POST['hstlstattr']) $hstlstattr = $_POST['hstlstattr'];
// check if password is correct // check if password is correct
// if not: load login page // if not: load login page
if ($passwd != $conf->get_Passwd()) { if ($passwd != $conf->get_Passwd()) {