From 681b5e7b7a927ff39696b5649b12bc6e47fdbc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Holeczy?= Date: Thu, 16 Jan 2020 10:52:54 +0100 Subject: [PATCH] Fix comparing IPs --- plugins/login-ip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/login-ip.php b/plugins/login-ip.php index f8363ea5..1d51551c 100644 --- a/plugins/login-ip.php +++ b/plugins/login-ip.php @@ -23,7 +23,7 @@ class AdminerLoginIp { function login($login, $password) { 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) { return true; }