mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Merge branch 'ent-4622-Fallo-filtrado-en-listado-acceso-API' into 'develop'
Fixed bug with API access list - #4622 See merge request artica/pandorafms!2724
This commit is contained in:
commit
ec98d861b2
@ -301,8 +301,13 @@ function isInACL($ip)
|
|||||||
// example lab.artica.es without '*'
|
// example lab.artica.es without '*'
|
||||||
$name = [];
|
$name = [];
|
||||||
$name = gethostbyname($acl_ip);
|
$name = gethostbyname($acl_ip);
|
||||||
if (preg_match('/'.$name.'/', $ip)) {
|
if (preg_match('/'.$name.'/', $ip, $matches)) {
|
||||||
return true;
|
// 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