[tor-commits] [oonib/master] Make the header length check more stringent.
art at torproject.org
art at torproject.org
Wed May 21 10:48:10 UTC 2014
commit 543ed205930da70b9311b9a696eb482c054bd6c4
Author: Arturo Filastò <art at fuffa.org>
Date: Wed May 7 23:32:16 2014 +0200
Make the header length check more stringent.
---
oonib/testhelpers/http_helpers.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/oonib/testhelpers/http_helpers.py b/oonib/testhelpers/http_helpers.py
index b2afc59..ed3f582 100644
--- a/oonib/testhelpers/http_helpers.py
+++ b/oonib/testhelpers/http_helpers.py
@@ -51,7 +51,8 @@ class SimpleHTTPChannel(basic.LineReceiver, policies.TimeoutMixin):
self.setTimeout(self.timeOut)
def lineReceived(self, line):
- if len(self.__header) >= self.maxHeaderLineLength:
+ if (len(self.__header) + len(line)) >= self.maxHeaderLineLength \
+ and not self.__first_line:
log.err("Maximum header length reached.")
return self.transport.loseConnection()
More information about the tor-commits
mailing list