fixed IP check

This commit is contained in:
Roland Gruber 2015-10-30 19:09:55 +00:00
parent d459045561
commit 8e125eb168
1 changed files with 3 additions and 1 deletions

View File

@ -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++) {