From a771b6cb35770f7b8b5087caf923aeec8fbefe96 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 11 Jan 2015 11:16:52 +0100 Subject: [PATCH] Fixed problem with too early SysPrefs reference. --- includes/session.inc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/includes/session.inc b/includes/session.inc index b5cb1e2e..003adc78 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -342,16 +342,6 @@ if (!isset($path_to_root)) $path_to_root = "."; } -//---------------------------------------------------------------------------------------- -// set to reasonable values if not set in config file (pre-2.3.12 installations) - -if ((!isset($SysPrefs->login_delay)) || ($SysPrefs->login_delay < 0)) - $SysPrefs->login_delay = 10; - -if ((!isset($SysPrefs->login_max_attempts)) || ($SysPrefs->login_max_attempts < 0)) - $SysPrefs->login_max_attempts = 3; - - // Prevent register_globals vulnerability if (isset($_GET['path_to_root']) || isset($_POST['path_to_root'])) die("Restricted access"); @@ -383,6 +373,15 @@ $_SESSION['SysPrefs'] = new sys_prefs(); $SysPrefs = &$_SESSION['SysPrefs']; +//---------------------------------------------------------------------------------------- +// set to reasonable values if not set in config file (pre-2.3.12 installations) + +if ((!isset($SysPrefs->login_delay)) || ($SysPrefs->login_delay < 0)) + $SysPrefs->login_delay = 10; + +if ((!isset($SysPrefs->login_max_attempts)) || ($SysPrefs->login_max_attempts < 0)) + $SysPrefs->login_max_attempts = 3; + if ($SysPrefs->go_debug > 0) error_reporting(-1); else -- 2.30.2