check full email in AllowAuth
This commit is contained in:
parent
9129f8e38c
commit
e368d26fc1
2 changed files with 2 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ package bot
|
|||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"gitlab.com/etke.cc/go/mxidwc"
|
||||
"maunium.net/go/mautrix/id"
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue