Skip to content

Commit

Permalink
Fix comparing IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
Holicz authored and vrana committed Jan 30, 2020
1 parent 9c5efb9 commit 681b5e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/login-ip.php
Expand Up @@ -23,7 +23,7 @@ function __construct($ips, $forwarded_for = array()) {

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;
}
Expand Down

0 comments on commit 681b5e7

Please sign in to comment.