mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-02-17 07:03:58 +00:00
remove newlines before b64decode (#649)
This commit is contained in:
@@ -892,7 +892,11 @@ def extract_report(content: Union[bytes, str, BinaryIO]) -> str:
|
||||
try:
|
||||
if isinstance(content, str):
|
||||
try:
|
||||
file_object = BytesIO(b64decode(content, validate=True))
|
||||
file_object = BytesIO(
|
||||
b64decode(
|
||||
content.replace("\n", "").replace("\r", ""), validate=True
|
||||
)
|
||||
)
|
||||
except binascii.Error:
|
||||
return content
|
||||
header = file_object.read(6)
|
||||
|
||||
Reference in New Issue
Block a user