From: Matt Mullins Date: Tue, 13 Dec 2011 06:33:13 +0000 (-0800) Subject: Fix DoS where any IRC user can crash the bot. X-Git-Tag: v7~1 X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=6b09ae5e24e06afd2be44163f895b77d770af3cf;p=erlbot.git Fix DoS where any IRC user can crash the bot. --- 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",