summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-11-12 23:24:59 -0200
committerKali Kaneko <kali@leap.se>2013-11-12 23:24:59 -0200
commit4f470969f3ae6fb6f37a0fb5abda49927e2a4234 (patch)
treed38a499dfb81caa8464cf4b6665e50888de2940f
parent3a6737ee5d4d83308e5f25851c0627724a0381ac (diff)
parentf366b3aa7fe88f38673727f37aa018f4ee4aad98 (diff)
Merge remote-tracking branch 'drebs/bug/4454_remove-multipart-encrypted-header-after-decrypting' into develop
-rw-r--r--mail/changes/bug_4454_remove-multipart-encrypted-header-after-decrypting2
-rw-r--r--mail/src/leap/mail/imap/fetch.py2
2 files changed, 4 insertions, 0 deletions
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 00000000..8aa0aaae
--- /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 4d474089..bc04bd15 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: