Skip to content

Commit

Permalink
check max_form_memory_size is set before comparing (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism authored Oct 25, 2024
2 parents 972e5ed + 3a96a11 commit 7909c16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
0.19.8
------

* Bugfix Fix missing check that caused the previous fix to raise an error. #366

0.19.7 2024-10-25
-----------------

Expand Down
2 changes: 1 addition & 1 deletion src/quart/formparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async def parse(
container = self.start_file_streaming(event, content_length)
_write = container.write
elif isinstance(event, Data):
if field_size is not None:
if self.max_form_memory_size is not None and field_size is not None:
field_size += len(event.data)

if field_size > self.max_form_memory_size:
Expand Down

0 comments on commit 7909c16

Please sign in to comment.