downstream: error out if SASL PLAIN identity is specified
This commit is contained in:
parent
b3be05559b
commit
43e6febc15
@ -918,6 +918,9 @@ func (dc *downstreamConn) handleAuthenticate(msg *irc.Message) (result *downstre
|
||||
switch mech {
|
||||
case "PLAIN":
|
||||
server = sasl.NewPlainServer(sasl.PlainAuthenticator(func(identity, username, password string) error {
|
||||
if identity != "" && identity != username {
|
||||
return fmt.Errorf("SASL PLAIN identity not supported")
|
||||
}
|
||||
dc.sasl.plain = &saslPlain{
|
||||
Username: username,
|
||||
Password: password,
|
||||
|
Loading…
Reference in New Issue
Block a user