X-Git-Url: https://jfr.im/git/irc/quakenet/qwebirc.git/blobdiff_plain/0d9ac3776606c8e922960d768c7a5d8aca5b0e3b..341581c49a6b5b15f4bebea29011c066016dc75b:/qwebirc/ajaxengine.py diff --git a/qwebirc/ajaxengine.py b/qwebirc/ajaxengine.py index 84b4a09..ff6bd8e 100644 --- a/qwebirc/ajaxengine.py +++ b/qwebirc/ajaxengine.py @@ -181,6 +181,10 @@ class AJAXEngine(resource.Resource): except UnicodeDecodeError: decoded = command.decode("iso-8859-1", "ignore") + if len(decoded) > config.MAXLINELEN: + session.disconnect() + return [False, "Line too long"] + try: session.push(decoded) except AttributeError: # occurs when we haven't noticed an error