From 164238b8b5982d50b95cadef3baa4a52dda4a4b8 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Tue, 21 May 2024 11:09:27 +0000 Subject: [PATCH] Fix checking of included file sizes --- src/Content/ContentManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index 938f3d6f..2c1915b9 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -925,8 +925,8 @@ class ContentManager: raise VerifyError("No rules") # Check include size limit - max_size = rules.get("max_size", 0) - if content_size > max_size: + max_size = rules.get('max_size') + if max_size is not None and content_size > max_size: raise VerifyError(f'Include too large {content_size}B > {max_size}B') if rules.get("max_size_optional") is not None: # Include optional files limit