From: Jeff Hunter Date: Tue, 9 Jun 2020 20:18:29 +0000 (-0700) Subject: http: fix infinite loop hang with invalid gzip data X-Git-Tag: v6.1.0b1~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1d11efe14a48b5347b8e21022c10df4fb47bace;p=thirdparty%2Ftornado.git http: fix infinite loop hang with invalid gzip data --- diff --git a/tornado/http1connection.py b/tornado/http1connection.py index ac7170f7d..835027b47 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -737,6 +737,10 @@ class _GzipMessageDelegate(httputil.HTTPMessageDelegate): if ret is not None: await ret compressed_data = self._decompressor.unconsumed_tail + if compressed_data and not decompressed: + raise httputil.HTTPInputError( + "encountered unconsumed gzip data without making progress" + ) else: ret = self._delegate.data_received(chunk) if ret is not None: