mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-11-03 23:49:21 +00:00
Validate that string is base64 (#648)
This commit is contained in:
1 parent
1f3a1fc843
commit
792079a3e8
1 file changed
+1
-1
@@ -892,7 +892,7 @@ def extract_report(content: Union[bytes, str, BinaryIO]) -> str:
|
||||
try:
|
||||
if isinstance(content, str):
|
||||
try:
|
||||
file_object = BytesIO(b64decode(content))
|
||||
file_object = BytesIO(b64decode(content, validate=True))
|
||||
except binascii.Error:
|
||||
return content
|
||||
header = file_object.read(6)
|
||||
|
||||
Reference in new issue
Block a user