check full email in AllowAuth
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user