[evolution/gnome-40] I#1475 - Mail: Read Subject from PGP encrypted mail even without text/rfc822-headers part
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-40] I#1475 - Mail: Read Subject from PGP encrypted mail even without text/rfc822-headers part
- Date: Thu, 29 Apr 2021 16:29:24 +0000 (UTC)
commit 1e284e681b2af226ae6fd8bc2abc38e12a29dd89
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 29 18:26:11 2021 +0200
I#1475 - Mail: Read Subject from PGP encrypted mail even without text/rfc822-headers part
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1475
src/em-format/e-mail-parser-multipart-mixed.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/src/em-format/e-mail-parser-multipart-mixed.c b/src/em-format/e-mail-parser-multipart-mixed.c
index c469ff0f52..c421eb2c2b 100644
--- a/src/em-format/e-mail-parser-multipart-mixed.c
+++ b/src/em-format/e-mail-parser-multipart-mixed.c
@@ -178,22 +178,21 @@ empe_mp_mixed_parse (EMailParserExtension *extension,
}
if (i == 0 && g_str_has_suffix (part_id->str, ".encrypted-pgp")) {
+ ct = camel_mime_part_get_content_type (part);
+ if (ct && camel_content_type_param (ct, "protected-headers")) {
+ const gchar *subject;
+
+ /* The multipart/mixed contains some of the original headers */
+ subject = camel_medium_get_header (CAMEL_MEDIUM (part), "Subject");
+ if (subject)
+ empe_mp_mixed_maybe_update_message_info_headers (parser,
part_id->str, subject, cancellable);
+ }
+
ct = camel_mime_part_get_content_type (subpart);
if (ct && camel_content_type_is (ct, "text", "rfc822-headers") &&
camel_content_type_param (ct, "protected-headers")) {
- ct = camel_mime_part_get_content_type (part);
- if (ct && camel_content_type_param (ct, "protected-headers")) {
- const gchar *subject;
-
- /* The multipart/mixed contains some of the original headers */
- subject = camel_medium_get_header (CAMEL_MEDIUM (part), "Subject");
- if (subject) {
- empe_mp_mixed_maybe_update_message_info_headers (parser,
part_id->str, subject, cancellable);
-
- /* Skip the text/rfc822-headers part, it's not needed to be
shown */
- continue;
- }
- }
+ /* Skip the text/rfc822-headers part, it's not needed to be shown */
+ continue;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]