Add inRanges() and validateRanges() methods to IpFilter class

This commit is contained in:
Kijin Sung 2016-03-13 10:18:52 +09:00
parent 2effbea06f
commit 0adb13ca30
7 changed files with 52 additions and 77 deletions

View file

@ -445,13 +445,9 @@ class Debug
return $cache = true;
case 'ip':
$allowed_ip = Config::get('debug.allow');
foreach ($allowed_ip as $range)
if (IpFilter::inRanges(RX_CLIENT_IP, Config::get('debug.allow')))
{
if (IpFilter::inRange(RX_CLIENT_IP, $range))
{
return $cache = true;
}
return $cache = true;
}
return $cache = false;