mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 07:54:40 +03:00
also unicode-normalize usernames (email addresses) when logging into the imapserver and webapps
and don't do needless normalization for the username we got from scram: the scram package would have failed if the name wasn't already normalized. unicode may not be specified for sasl with imap (i'm not sure), but there's no point in accepting it over smtpserver but not in imapserver.
This commit is contained in:
@ -1544,7 +1544,7 @@ func (c *conn) cmdAuth(p *parser) {
|
||||
c.log.Infox("scram protocol error", err, slog.Any("remote", c.remoteIP))
|
||||
xsmtpUserErrorf(smtp.C455BadParams, smtp.SePol7Other0, "scram protocol error: %s", err)
|
||||
}
|
||||
username = norm.NFC.String(ss.Authentication)
|
||||
username = ss.Authentication
|
||||
la.LoginAddress = username
|
||||
c.log.Debug("scram auth", slog.String("authentication", username))
|
||||
account, la.AccountName, _, err = store.OpenEmail(c.log, username, false)
|
||||
@ -1620,7 +1620,7 @@ func (c *conn) cmdAuth(p *parser) {
|
||||
|
||||
// ../rfc/4422:1618
|
||||
buf := xreadInitial("")
|
||||
username = string(buf)
|
||||
username = norm.NFC.String(string(buf))
|
||||
la.LoginAddress = username
|
||||
|
||||
if !c.tls {
|
||||
|
Reference in New Issue
Block a user