From cd09a86d64aa3e8eb1644aaf8aa41b3f13d5eb72 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 8 Jul 2007 19:23:07 +0000 Subject: [PATCH] performance enhancements --- lam/lib/security.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lam/lib/security.inc b/lam/lib/security.inc index 0c7cc684..d2a27ec4 100644 --- a/lam/lib/security.inc +++ b/lam/lib/security.inc @@ -41,8 +41,6 @@ checkClientIP(); * The script is stopped if one of the checks fail. */ function startSecureSession() { - // check if client IP is on the list of valid IPs - checkClientIP(); // start session if (isset($_SESSION)) unset($_SESSION); $sessionDir = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/sess"; @@ -75,7 +73,8 @@ function startSecureSession() { * */ function checkClientIP() { - $cfg = new LAMCfgMain(); + if (isset($_SESSION['cfgMain'])) $cfg = $_SESSION['cfgMain']; + else $cfg = new LAMCfgMain(); $allowedHosts = $cfg->allowedHosts; // skip test if no hosts are defined if ($allowedHosts == "") return;