diff --git a/lam/lib/security.inc b/lam/lib/security.inc index b5b441ca..00b9a273 100644 --- a/lam/lib/security.inc +++ b/lam/lib/security.inc @@ -116,7 +116,9 @@ function checkClientIP() { $allowedHosts = $cfg->allowedHostsSelfService; } // skip test if no hosts are defined - if ($allowedHosts == "") return; + if (empty($allowedHosts) || empty($_SERVER['REMOTE_ADDR'])) { + return; + } $allowedHosts = explode(",", $allowedHosts); $grantAccess = false; for ($i = 0; $i < sizeof($allowedHosts); $i++) {