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 '*'
|
||||
$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…
Reference in New Issue