summaryrefslogtreecommitdiff
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
commit369897363f0fc4dae9dc7a024add97218b3bbbaf (patch)
treeb3f1d4e33947da24ff73221cb3e0e35165c65a78
parent65f9d0316e981f6ba6423ff8c73cbe94249b596c (diff)
fix badly terminated headers
-rw-r--r--mail/src/leap/mail/imap/messages.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mail/src/leap/mail/imap/messages.py b/mail/src/leap/mail/imap/messages.py
index 2ace1030..356145f0 100644
--- a/mail/src/leap/mail/imap/messages.py
+++ b/mail/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