From 6b09ae5e24e06afd2be44163f895b77d770af3cf Mon Sep 17 00:00:00 2001 From: Matt Mullins Date: Mon, 12 Dec 2011 22:33:13 -0800 Subject: [PATCH] Fix DoS where any IRC user can crash the bot. --- irc/irc_command.erl | 2 -- 1 file changed, 2 deletions(-) diff --git a/irc/irc_command.erl b/irc/irc_command.erl index 1b39b19..87463eb 100644 --- a/irc/irc_command.erl +++ b/irc/irc_command.erl @@ -16,8 +16,6 @@ do_privmsg_command(Text, From) -> middles = [From], trailing = element(Index, Choices)}, irc_conn:send_command(self(), NewCommand); - "crash" -> - throw(crash); "random" ++ Choices -> Response = random_choice(Choices), NewCommand = #irc_command{command = "PRIVMSG", -- 2.11.0