Fix possible flood exploit
This commit is contained in:
parent
686d72e1a2
commit
b0aed85904
|
@ -38,6 +38,7 @@ class Connhandler(threading.Thread):
|
||||||
self.inpc=inpc
|
self.inpc=inpc
|
||||||
self.logc=logc
|
self.logc=logc
|
||||||
def send(self,s):
|
def send(self,s):
|
||||||
|
if len(s)>1024: s=s[:1024]
|
||||||
self.sock.send(s+'\r\n')
|
self.sock.send(s+'\r\n')
|
||||||
if s.split(' ')[0]!='PONG':
|
if s.split(' ')[0]!='PONG':
|
||||||
self.logc.send(s+'\n')
|
self.logc.send(s+'\n')
|
||||||
|
|
Loading…
Reference in New Issue