diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-08-01 20:00:17 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-08-01 20:12:55 +0800 |
commit | 7ef4b7616e7563f8c7181117d8ae16b044848a02 (patch) | |
tree | 6964b92c27ddadaf9eae091a9e68bce062384594 /em-format | |
parent | 856b0e7450b1f0efd8075cf9a74fd0d5188c2dd6 (diff) | |
download | gsoc2013-evolution-7ef4b7616e7563f8c7181117d8ae16b044848a02.tar gsoc2013-evolution-7ef4b7616e7563f8c7181117d8ae16b044848a02.tar.gz gsoc2013-evolution-7ef4b7616e7563f8c7181117d8ae16b044848a02.tar.bz2 gsoc2013-evolution-7ef4b7616e7563f8c7181117d8ae16b044848a02.tar.lz gsoc2013-evolution-7ef4b7616e7563f8c7181117d8ae16b044848a02.tar.xz gsoc2013-evolution-7ef4b7616e7563f8c7181117d8ae16b044848a02.tar.zst gsoc2013-evolution-7ef4b7616e7563f8c7181117d8ae16b044848a02.zip |
Bug 705194 - Failure to decrypt inline encrypted GPG messages
Commit 1556f4d447dfca9d3b6ebb605ec899dc7b9a5361 in 3.8.4 broke inline
PGP encrypted messages, because the parser was treating the encrypted
message content as an attachment even though the content type is just
text/plain. This ensures the message content is treated correctly.
(cherry picked from commit ca67414c22d003f5e005cc05689efdec38dcd4e7)
Diffstat (limited to 'em-format')
-rw-r--r-- | em-format/e-mail-parser-inlinepgp-encrypted.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/em-format/e-mail-parser-inlinepgp-encrypted.c b/em-format/e-mail-parser-inlinepgp-encrypted.c index 1c0cd58e6e..ae008dca02 100644 --- a/em-format/e-mail-parser-inlinepgp-encrypted.c +++ b/em-format/e-mail-parser-inlinepgp-encrypted.c @@ -98,10 +98,20 @@ empe_inlinepgp_encrypted_parse (EMailParserExtension *extension, /* this ensures to show the 'opart' as inlined, if possible */ if (mime_type && g_ascii_strcasecmp (mime_type, "application/octet-stream") == 0) { - const gchar *snoop = e_mail_part_snoop_type (opart); + const gchar *snoop; - if (snoop) + snoop = e_mail_part_snoop_type (opart); + + if (snoop != NULL) { camel_data_wrapper_set_mime_type (dw, snoop); + + /* Set the MIME type on the 'opart' itself as well. + * If it's "text/plain", then we want the TextPlain + * parser extension to treat it as "text/plain" and + * NOT wrap it as an attachment. */ + camel_data_wrapper_set_mime_type ( + CAMEL_DATA_WRAPPER (opart), snoop); + } } e_mail_part_preserve_charset_in_content_type (part, opart); |