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 {
|
switch mech {
|
||||||
case "PLAIN":
|
case "PLAIN":
|
||||||
server = sasl.NewPlainServer(sasl.PlainAuthenticator(func(identity, username, password string) error {
|
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{
|
dc.sasl.plain = &saslPlain{
|
||||||
Username: username,
|
Username: username,
|
||||||
Password: password,
|
Password: password,
|
||||||
|
Loading…
Reference in New Issue
Block a user