Fix comparing IPs

This commit is contained in:
Lukáš Holeczy 2020-01-16 10:52:54 +01:00 committed by Jakub Vrana
parent 9c5efb9f8c
commit 681b5e7b7a

View file

@ -23,7 +23,7 @@ class AdminerLoginIp {
function login($login, $password) { function login($login, $password) {
foreach ($this->ips as $ip) { foreach ($this->ips as $ip) {
if (strncasecmp($_SERVER["REMOTE_ADDR"], $ip, strlen($ip))) { if (strncasecmp($_SERVER["REMOTE_ADDR"], $ip, strlen($ip)) == 0) {
if (!$this->forwarded_for) { if (!$this->forwarded_for) {
return true; return true;
} }