mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 20:58:16 +03:00
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.
This commit is contained in:
parent
e5e15a3965
commit
7b3ebb2647
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user