From a0f1971583f0f790013e2145fb5ac573c59fbdef Mon Sep 17 00:00:00 2001 From: slawkens Date: Fri, 25 Oct 2024 19:01:28 +0200 Subject: [PATCH] Fix login if limiter is disabled --- system/pages/account/login.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/pages/account/login.php b/system/pages/account/login.php index 98e85b46..3e8ebba3 100644 --- a/system/pages/account/login.php +++ b/system/pages/account/login.php @@ -42,7 +42,7 @@ if(!empty($login_account) && !empty($login_password)) } } - 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) { @@ -82,10 +82,10 @@ if(!empty($login_account) && !empty($login_password)) $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 {