Skip to content

Commit

Permalink
Use hash_equals when comparing IPv6 allow rules
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Sep 2, 2016
1 parent 9f0c4c3 commit 2f2e356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/ip_allow_deny.lib.php
Expand Up @@ -194,7 +194,7 @@ function PMA_ipv6MaskTest($test_range, $ip_to_test)

if ($is_single) {
$range_hex = bin2hex(inet_pton($test_range));
$result = $ip_hex === $range_hex;
$result = hash_equals($ip_hex, $range_hex);
return $result;
}

Expand Down

0 comments on commit 2f2e356

Please sign in to comment.