fixed IP check
This commit is contained in:
parent
d459045561
commit
8e125eb168
|
@ -116,7 +116,9 @@ function checkClientIP() {
|
||||||
$allowedHosts = $cfg->allowedHostsSelfService;
|
$allowedHosts = $cfg->allowedHostsSelfService;
|
||||||
}
|
}
|
||||||
// skip test if no hosts are defined
|
// skip test if no hosts are defined
|
||||||
if ($allowedHosts == "") return;
|
if (empty($allowedHosts) || empty($_SERVER['REMOTE_ADDR'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$allowedHosts = explode(",", $allowedHosts);
|
$allowedHosts = explode(",", $allowedHosts);
|
||||||
$grantAccess = false;
|
$grantAccess = false;
|
||||||
for ($i = 0; $i < sizeof($allowedHosts); $i++) {
|
for ($i = 0; $i < sizeof($allowedHosts); $i++) {
|
||||||
|
|
Loading…
Reference in New Issue