check full email in AllowAuth

This commit is contained in:
Aine
2022-09-23 10:37:08 +03:00
parent 9129f8e38c
commit e368d26fc1
2 changed files with 2 additions and 2 deletions

View File

@@ -36,8 +36,7 @@ func (m *msa) Login(state *smtp.ConnectionState, username, password string) (smt
return nil, errors.New("please, provide an email address")
}
mailbox := utils.Mailbox(username)
if !m.bot.AllowAuth(mailbox, password) {
if !m.bot.AllowAuth(username, password) {
return nil, errors.New("email or password is invalid")
}