From 16e214e4fb297840e26d2f67bb15df21ad4ab4cd Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 12 Jan 2023 06:58:18 -0500 Subject: [PATCH] fix #2031 Sanitize the in-band error message from REHASH --- irc/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc/handlers.go b/irc/handlers.go index 05b713d2..43fd1deb 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -2887,7 +2887,7 @@ func rehashHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respo // TODO all operators should get a notice of some kind here rb.Notice(client.t("Rehash complete")) } else { - rb.Add(nil, server.name, ERR_UNKNOWNERROR, nick, "REHASH", err.Error()) + rb.Add(nil, server.name, ERR_UNKNOWNERROR, nick, "REHASH", ircutils.SanitizeText(err.Error(), 350)) } return false }