Skip to content

Commit

Permalink
FIX: ip in range
Browse files Browse the repository at this point in the history
  • Loading branch information
daycry committed Feb 9, 2023
1 parent 1df691c commit 2f658a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validators/ApiKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function check(RequestInterface $request, object $petition = null,
if ($list_ip) {
if (strpos($list_ip, '/') !== false) {
//check IP is in the range
$found_address = \Daycry\RestServer\Libraries\CheckIp::ipv4_in_range(trim($list_ip), $row->ip_addresses);
$found_address = \Daycry\RestServer\Libraries\CheckIp::ipv4_in_range(trim($ip_address), trim($list_ip));
} elseif ($ip_address === trim($list_ip)) {
// there is a match, set the the value to TRUE and break out of the loop
$found_address = true;
Expand Down

0 comments on commit 2f658a5

Please sign in to comment.