[evolution-data-server/gnome-3-8] Do not consider PGP and S/MIME subparts as attachments



commit 8fb7cbf15592e84cc4a19ef12e377442fe64b539
Author: Milan Crha <mcrha redhat com>
Date:   Wed Apr 24 08:54:12 2013 +0200

    Do not consider PGP and S/MIME subparts as attachments

 camel/camel-mime-message.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index 8e48636..3c1c44e 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -1234,10 +1234,24 @@ find_attachment (CamelMimeMessage *msg,
                  gpointer data)
 {
        const CamelContentDisposition *cd;
+       CamelContentType *ct;
        gboolean *found = (gboolean *) data;
 
        g_return_val_if_fail (part != NULL, FALSE);
 
+       ct = camel_mime_part_get_content_type (part);
+       if (ct && (
+           camel_content_type_is (ct, "application", "xpkcs7mime") ||
+           camel_content_type_is (ct, "application", "x-pkcs7-mime") ||
+           camel_content_type_is (ct, "application", "pkcs7-mime") ||
+           camel_content_type_is (ct, "application", "pkcs7-signature") ||
+           camel_content_type_is (ct, "application", "xpkcs7-signature") ||
+           camel_content_type_is (ct, "application", "x-pkcs7-signature") ||
+           camel_content_type_is (ct, "application", "pkcs7-signature") ||
+           camel_content_type_is (ct, "application", "pgp-signature") ||
+           camel_content_type_is (ct, "application", "pgp-encrypted")))
+               return !(*found);
+
        cd = camel_mime_part_get_content_disposition (part);
 
        if (cd) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]