Skip to content

Commit

Permalink
[Security] fixes ip checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin authored Jan 15, 2021
1 parent e7a63ec commit d18f525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/authentication/Manager/IPWhiteListManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function isWhiteListed()
if (is_array($ips)) {
foreach ($ips as $ip) {
$callerIp = !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if (isset($callerIp) && inet_ntop($ip) === inet_ntop($callerIp)) {
if (isset($callerIp) && $ip === $callerIp) {
return true;
}
}
Expand Down

0 comments on commit d18f525

Please # to comment.