mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
Fixed bug with API access list - #4622
This commit is contained in:
parent
a56d5dcad5
commit
515521cd00
@ -301,8 +301,13 @@ function isInACL($ip)
|
||||
// example lab.artica.es without '*'
|
||||
$name = [];
|
||||
$name = gethostbyname($acl_ip);
|
||||
if (preg_match('/'.$name.'/', $ip)) {
|
||||
return true;
|
||||
if (preg_match('/'.$name.'/', $ip, $matches)) {
|
||||
// This is for false matches, like '' or $.
|
||||
if (count($matches) == 1 && $matches[0] == '') {
|
||||
continue;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user