From 41822813c073f02518c5584abc6583ed784dfdc3 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Fri, 30 Jul 2021 14:03:40 -0400 Subject: [PATCH] clean up redundant check for sasl mechanism --- irc/handlers.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/irc/handlers.go b/irc/handlers.go index 7a636c64..c9300920 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -220,19 +220,8 @@ func authenticateHandler(server *Server, client *Client, msg ircmsg.Message, rb } // call actual handler - handler, handlerExists := EnabledSaslMechanisms[session.sasl.mechanism] - - // like 100% not required, but it's good to be safe I guess - if !handlerExists { - rb.Add(nil, server.name, ERR_SASLFAIL, details.nick, client.t("SASL authentication failed")) - session.sasl.Clear() - return false - } - - // let the SASL handler do its thing - exiting := handler(server, client, session, data, rb) - - return exiting + handler := EnabledSaslMechanisms[session.sasl.mechanism] + return handler(server, client, session, data, rb) } // AUTHENTICATE PLAIN