1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-24 00:08:48 -05:00

disarm plain text detection to include unsigned messages

This commit is contained in:
Felix Hammerl 2014-01-18 13:14:41 +01:00
parent 0d1f0000de
commit b234ec57f5

View File

@ -813,7 +813,10 @@ define(function(require) {
email.encrypted = true;
// does our message block even need to be parsed?
if (decrypted.indexOf('Content-Type: multipart/signed') === -1) {
// this is a very primitive detection if we have a mime node or plain text
// taking this out breaks compatibility to clients < 0.5
if (decrypted.indexOf('Content-Transfer-Encoding:') === -1 &&
decrypted.indexOf('Content-Type:') === -1) {
// decrypted message is plain text and not a well-formed email
email.body = decrypted;
localCallback(null, email);