1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

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) {
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;
}