From 79cd7d3c3dab5a7fe55a2f11364990aa47cc21ab Mon Sep 17 00:00:00 2001 From: Sean Whalen <44679+seanthegeek@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:22:27 -0400 Subject: [PATCH] Actual 8.14.1 release - Fix unit tests by enforcing base64 validation --- parsedmarc/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index cabb6ec4..cdfe6182 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -601,7 +601,8 @@ def extract_report(input_): file_object = None if isinstance(input_, str): try: - file_object = BytesIO(b64decode(input_)) + input_ = b64decode(input_, validate=True) + file_object = BytesIO(input_) except binascii.Error: pass if file_object is None: