Skip to content

Commit

Permalink
Fix login if limiter is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Oct 25, 2024
1 parent cb5fc84 commit a0f1971
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/pages/account/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
}

if($account_logged->isLoaded() && encrypt((USE_ACCOUNT_SALT ? $account_logged->getCustomField('salt') : '') . $login_password) == $account_logged->getPassword() && ($limiter->enabled && !$limiter->exceeded($ip))
if($account_logged->isLoaded() && encrypt((USE_ACCOUNT_SALT ? $account_logged->getCustomField('salt') : '') . $login_password) == $account_logged->getPassword() && (!$limiter->enabled || !$limiter->exceeded($ip))
)
{
if (setting('core.account_mail_verify') && (int)$account_logged->getCustomField('email_verified') !== 1) {
Expand Down Expand Up @@ -82,10 +82,10 @@
$limiter->increment($ip);
if ($limiter->exceeded($ip)) {
$errorMessage = 'A wrong password has been entered ' . $limiter->max_attempts . ' times in a row. You are unable to log into your account for the next ' . $limiter->ttl . ' minutes. Please wait.';
}
}

$errors[] = $errorMessage;

}
}
else {
Expand Down

0 comments on commit a0f1971

Please sign in to comment.