From f366b3aa7fe88f38673727f37aa018f4ee4aad98 Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 12 Nov 2013 11:49:43 -0200 Subject: Remove 'multipart/encrypted' header after decrypting incoming mail. Closes #4454. --- .../changes/bug_4454_remove-multipart-encrypted-header-after-decrypting | 2 ++ mail/src/leap/mail/imap/fetch.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 mail/changes/bug_4454_remove-multipart-encrypted-header-after-decrypting (limited to 'mail') diff --git a/mail/changes/bug_4454_remove-multipart-encrypted-header-after-decrypting b/mail/changes/bug_4454_remove-multipart-encrypted-header-after-decrypting new file mode 100644 index 0000000..8aa0aaa --- /dev/null +++ b/mail/changes/bug_4454_remove-multipart-encrypted-header-after-decrypting @@ -0,0 +1,2 @@ + o Remove 'multipart/encrypted' header after decrypting incoming mail. Closes + #4454. diff --git a/mail/src/leap/mail/imap/fetch.py b/mail/src/leap/mail/imap/fetch.py index 4d47408..bc04bd1 100644 --- a/mail/src/leap/mail/imap/fetch.py +++ b/mail/src/leap/mail/imap/fetch.py @@ -387,6 +387,8 @@ class LeapIncomingMail(object): decrdata = decrdata.encode(encoding, 'replace') decrmsg = parser.parsestr(decrdata) + # remove original message's multipart/encrypted content-type + del(origmsg['content-type']) # replace headers back in original message for hkey, hval in decrmsg.items(): try: -- cgit v1.2.3