[evolution] Bug 711532 - Infinite recursion from message/news attachment



commit 465050f57e0bd107a782a233e1f8733ea6edd671
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Nov 6 11:21:30 2013 -0500

    Bug 711532 - Infinite recursion from message/news attachment
    
    This is only a partial solution for the test case the bug report.
    The message/news part of the test case is also Base64-encoded, but
    Evolution (or Camel) is not decoding it properly.  Still digging.

 em-format/e-mail-parser-message-rfc822.c |    5 +++--
 em-format/e-mail-parser-message.c        |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/em-format/e-mail-parser-message-rfc822.c b/em-format/e-mail-parser-message-rfc822.c
index e9bfab1..3d0078c 100644
--- a/em-format/e-mail-parser-message-rfc822.c
+++ b/em-format/e-mail-parser-message-rfc822.c
@@ -73,7 +73,7 @@ empe_msg_rfc822_parse (EMailParserExtension *extension,
         * CamelMimePart, sometimes the CamelMimePart itself represents
         * the RFC822 message. */
        ct = camel_mime_part_get_content_type (part);
-       if (camel_content_type_is (ct, "message", "rfc822")) {
+       if (camel_content_type_is (ct, "message", "*")) {
                new_stream = camel_stream_mem_new ();
                mime_parser = camel_mime_parser_new ();
                message = (CamelMimePart *) camel_mime_message_new ();
@@ -82,7 +82,8 @@ empe_msg_rfc822_parse (EMailParserExtension *extension,
                camel_data_wrapper_decode_to_stream_sync (
                        dw, new_stream, cancellable, NULL);
                g_seekable_seek (
-                       G_SEEKABLE (new_stream), 0, G_SEEK_SET, cancellable, NULL);
+                       G_SEEKABLE (new_stream), 0,
+                       G_SEEK_SET, cancellable, NULL);
                camel_mime_parser_init_with_stream (
                        mime_parser, new_stream, NULL);
                camel_mime_part_construct_from_parser_sync (
diff --git a/em-format/e-mail-parser-message.c b/em-format/e-mail-parser-message.c
index 6096632..7065180 100644
--- a/em-format/e-mail-parser-message.c
+++ b/em-format/e-mail-parser-message.c
@@ -72,7 +72,7 @@ empe_message_parse (EMailParserExtension *extension,
        ct = camel_mime_part_get_content_type (part);
        mime_type = camel_content_type_simple (ct);
 
-       if (mime_type && g_ascii_strcasecmp (mime_type, "message/rfc822") == 0) {
+       if (camel_content_type_is (ct, "message", "*")) {
                /* get mime type of the content of the message,
                 * instead of using a generic message/rfc822 */
                CamelDataWrapper *content;


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