From 7b3ebb264781485590cce0be11866057bafc578e Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Thu, 6 Feb 2025 15:28:01 +0100 Subject: [PATCH] imapserver: remove unreachable check for logindisabled given the "false" flag above when opening the account by email. the login disabled case is handled after the various auth mechanisms in a single place. noticed while making other changes. --- imapserver/server.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/imapserver/server.go b/imapserver/server.go index 6ce94e7..d9c3464 100644 --- a/imapserver/server.go +++ b/imapserver/server.go @@ -1966,12 +1966,6 @@ func (c *conn) cmdAuthenticate(tag, cmd string, p *parser) { c.loginAttempt.Result = store.AuthBadCredentials c.log.Info("failed authentication attempt", slog.String("username", username), slog.Any("remote", c.remoteIP)) xusercodeErrorf("AUTHENTICATIONFAILED", "bad credentials") - } else if errors.Is(err, store.ErrLoginDisabled) { - c.loginAttempt.Result = store.AuthLoginDisabled - c.log.Info("account login disabled", slog.String("username", username)) - // No error code, we don't want to cause prompt for new password - // (AUTHENTICATIONFAILED) and don't want to trigger message suppression with ALERT. - xuserErrorf("%s", err) } xserverErrorf("looking up address: %v", err) }