]> git.joonet.de Git - adminer.git/commitdiff
Fix comparing IPs
authorLukáš Holeczy <holi.4fan@gmail.com>
Thu, 16 Jan 2020 09:52:54 +0000 (10:52 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 30 Jan 2020 17:32:34 +0000 (18:32 +0100)
plugins/login-ip.php

index f8363ea55655bbbc437090f7c8318808b186e21c..1d51551c9d0064c4d81008e1f4aa5f3f96aa38ed 100644 (file)
@@ -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;
                                }