// preg instead strpos
This commit is contained in:
@@ -919,7 +919,7 @@ class FrontControllerCore extends Controller
|
|||||||
$ips = array_map('trim', $ips);
|
$ips = array_map('trim', $ips);
|
||||||
if (is_array($ips) && count($ips))
|
if (is_array($ips) && count($ips))
|
||||||
foreach ($ips as $ip)
|
foreach ($ips as $ip)
|
||||||
if (!empty($ip) && strpos($user_ip, $ip) === 0)
|
if (!empty($ip) && preg_match('/^'.$ip.'.*/', $user_ip))
|
||||||
$allowed = true;
|
$allowed = true;
|
||||||
return $allowed;
|
return $allowed;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user