summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-01-30 17:23:19 -0400
committerKali Kaneko <kali@leap.se>2014-01-30 17:23:19 -0400
commit5cc82b3e8937c0e4488f79db79891c90a2ce3d47 (patch)
tree588c891a74ef4f68f6c147b50b88b7e47db0f82b /src/leap/mail/imap
parent5818a2e6826d84cd82cc578fbce95aa549d70e25 (diff)
fix badly terminated headers
Diffstat (limited to 'src/leap/mail/imap')
-rw-r--r--src/leap/mail/imap/messages.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/leap/mail/imap/messages.py b/src/leap/mail/imap/messages.py
index 2ace103..356145f 100644
--- a/src/leap/mail/imap/messages.py
+++ b/src/leap/mail/imap/messages.py
@@ -407,6 +407,10 @@ class LeapMessage(fields, MailParser, MBoxParser):
if not isinstance(value, str):
value = value.encode(charset, 'replace')
+ if value.endswith(";"):
+ # bastards
+ value = value[:-1]
+
# filter original dict by negate-condition
if cond(key):
headers2[key] = value