From 0345390aa1b70d0b80bbccf8331ee592856508e5 Mon Sep 17 00:00:00 2001 From: Joseph Ishac Date: Wed, 14 Apr 2021 11:14:44 -0400 Subject: [PATCH] Fixed oversight in regular expression (boundary cannot be empty) --- offlineimap/folder/Maildir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py index 827d8ce..64527c4 100644 --- a/offlineimap/folder/Maildir.py +++ b/offlineimap/folder/Maildir.py @@ -241,7 +241,7 @@ class MaildirFolder(BaseFolder): # soft fix this message to resolve the python library looking for properly # quoted boundaries. try: boundary_field = \ - re.search(b"content-type:.*(boundary=[\"]?[A-Za-z0-9'()+_,-./:=? ]*[\"]?)", + re.search(b"content-type:.*(boundary=[\"]?[A-Za-z0-9'()+_,-./:=? ]+[\"]?)", re.split(b'[\r]?\n[\r]?\n',raw_msg_bytes)[0],re.IGNORECASE).group(1) except AttributeError: # No match