diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 01:56:34 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 01:56:34 -0500 |
commit | 73e14fb7049306439a5637ff261f1370a94518e5 (patch) | |
tree | f9ef6c4782b0849bae1927f2c1ab9bbd8d97aa4d /mailnews/mime/src/mimei.cpp | |
parent | dc77b707f20280cd057368ca11fafc2c0bfc9414 (diff) | |
download | UXP-73e14fb7049306439a5637ff261f1370a94518e5.tar UXP-73e14fb7049306439a5637ff261f1370a94518e5.tar.gz UXP-73e14fb7049306439a5637ff261f1370a94518e5.tar.lz UXP-73e14fb7049306439a5637ff261f1370a94518e5.tar.xz UXP-73e14fb7049306439a5637ff261f1370a94518e5.zip |
Bug 1240290
Tag #1273
Diffstat (limited to 'mailnews/mime/src/mimei.cpp')
-rw-r--r-- | mailnews/mime/src/mimei.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/mailnews/mime/src/mimei.cpp b/mailnews/mime/src/mimei.cpp index c0a134a62..015830a80 100644 --- a/mailnews/mime/src/mimei.cpp +++ b/mailnews/mime/src/mimei.cpp @@ -731,7 +731,7 @@ mime_find_class (const char *content_type, MimeHeaders *hdrs, // Allowing them would leak the plain text in case the part is // cleverly hidden and the decrypted content gets included in // replies and forwards. - clazz = (MimeObjectClass *)&mimeExternalObjectClass; + clazz = (MimeObjectClass *)&mimeSuppressedCryptoClass; return clazz; } @@ -951,9 +951,14 @@ mime_create (const char *content_type, MimeHeaders *hdrs, (clazz != (MimeObjectClass *)&mimeInlineTextRichtextClass) && (clazz != (MimeObjectClass *)&mimeInlineTextEnrichedClass) && (clazz != (MimeObjectClass *)&mimeMessageClass) && - (clazz != (MimeObjectClass *)&mimeInlineImageClass) ) + (clazz != (MimeObjectClass *)&mimeInlineImageClass) ) { // not a special inline type, so show as attachment - clazz = (MimeObjectClass *)&mimeExternalObjectClass; + // However, mimeSuppressedCryptoClass is treated identically as + // mimeExternalObjectClass, let's not lose that type information. + if (clazz != (MimeObjectClass *)&mimeSuppressedCryptoClass) { + clazz = (MimeObjectClass *)&mimeExternalObjectClass; + } + } } /* If the option `Show Attachments Inline' is off, now would be the time to change our mind... */ @@ -1221,21 +1226,6 @@ mime_crypto_object_p(MimeHeaders *hdrs, bool clearsigned_counts, MimeDisplayOpti return false; } -/* Whether the given object has written out the HTML version of its headers - in such a way that it will have a "crypto stamp" next to the headers. If - this is true, then the child must write out its HTML slightly differently - to take this into account... - */ -bool -mime_crypto_stamped_p(MimeObject *obj) -{ - if (!obj) return false; - if (mime_typep (obj, (MimeObjectClass *) &mimeMessageClass)) - return ((MimeMessage *) obj)->crypto_stamped_p; - else - return false; -} - #endif // ENABLE_SMIME /* Puts a part-number into a URL. If append_p is true, then the part number |