Skip to content

Commit

Permalink
Merge pull request #9232 from nextcloud/fix/imap/no-failed-auth-no-ra…
Browse files Browse the repository at this point in the history
…te-limiting

fix(imap): Only rate limit actual auth errors
  • Loading branch information
ChristophWurst authored Feb 1, 2024
2 parents 5d79a11 + b19918d commit 86cf7be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/IMAP/ImapClientRateLimitingDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ protected function _login() {
try {
return parent::_login();
} catch (Horde_Imap_Client_Exception $e) {
if ($e->getCode() === Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED) {
if ($e->getCode() === Horde_Imap_Client_Exception::LOGIN_AUTHENTICATIONFAILED
&& $e->getMessage() === 'Authentication failed.') {
$current = $this->cache->inc($cacheKey);
}
throw $e;
Expand Down

0 comments on commit 86cf7be

Please sign in to comment.