commit 1930cd04ab5a7c6247e590d38095e4d46c70128a
parent ec7965e7527fe007d6bb0a5e1c2ae0f27fa35021
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Sat, 26 Sep 2009 11:06:19 -0700
Merge branch 'master' into next
Diffstat:
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
@@ -456,6 +456,20 @@ private
debug "no body for message/rfc822 enclosure; skipping"
[]
end
+ elsif m.header.content_type.downcase == "application/pgp" && m.body
+ ## apparently some versions of Thunderbird generate encryped email that
+ ## does not follow RFC3156, e.g. messages with X-Enigmail-Version: 0.95.0
+ ## they have no MIME multipart and just set the body content type to
+ ## application/pgp. this handles that.
+ ##
+ ## TODO: unduplicate code between here and multipart_encrypted_to_chunks
+ notice, sig, decryptedm = CryptoManager.decrypt m.body
+ if decryptedm # managed to decrypt
+ children = message_to_chunks decryptedm, true
+ [notice, sig] + children
+ else
+ [notice]
+ end
else
filename =
## first, paw through the headers looking for a filename