Do not accept compressed content from unauthenticated request
Closes #13142 (grafted from 1923117e935de62276352585185ced6d854bcb3d) --HG-- branch : 7.0
This commit is contained in:
1 parent
f0f0d9b7f1
commit
16d36f2390
2 files changed
+6
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
* Do not accept compressed content from unauthenticated request (#13142)
|
||||
|
||||
Version 7.0.9 - 2024-04-04
|
||||
--------------------------
|
||||
|
||||
@@ -71,8 +71,11 @@ class Request(_Request):
|
||||
@property
|
||||
def decoded_data(self):
|
||||
if self.content_encoding == 'gzip':
|
||||
zipfile = gzip.GzipFile(fileobj=BytesIO(self.data), mode='rb')
|
||||
return zipfile.read()
|
||||
if self.user_id:
|
||||
zipfile = gzip.GzipFile(fileobj=BytesIO(self.data), mode='rb')
|
||||
return zipfile.read()
|
||||
else:
|
||||
abort(HTTPStatus.UNSUPPORTED_MEDIA_TYPE)
|
||||
else:
|
||||
return self.data
|
||||
|
||||
|
||||
Reference in new issue
Block a user