From b0aed85904af91e36c4f539212d678892485b6c9 Mon Sep 17 00:00:00 2001 From: Juhani Haverinen Date: Tue, 1 Apr 2014 22:39:49 +0300 Subject: [PATCH] Fix possible flood exploit --- ircbot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ircbot.py b/ircbot.py index 1d11ad9..aa30803 100755 --- a/ircbot.py +++ b/ircbot.py @@ -38,6 +38,7 @@ class Connhandler(threading.Thread): self.inpc=inpc self.logc=logc def send(self,s): + if len(s)>1024: s=s[:1024] self.sock.send(s+'\r\n') if s.split(' ')[0]!='PONG': self.logc.send(s+'\n')