X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=util%2Frepair.c;h=f5cbb14b47f37988108ce12291319eef5a967997;hp=9fba97b7a67fa56e6f4a7a96beddccfbe0a231ac;hb=5aa60342c86b163848bca6882f34821d4871b849;hpb=cedc6db19d2bb37ce0c8f74be25cdf045b35caca;ds=sidebyside diff --git a/util/repair.c b/util/repair.c index 9fba97b7..f5cbb14b 100644 --- a/util/repair.c +++ b/util/repair.c @@ -49,8 +49,14 @@ _notmuch_crypto_payload_has_legacy_display (GMimeObject *payload) if (g_mime_multipart_get_count (mpayload) != 2) return false; first = g_mime_multipart_get_part (mpayload, 0); - if (! g_mime_content_type_is_type (g_mime_object_get_content_type (first), - "text", "rfc822-headers")) + /* Early implementations that generated "Legacy Display" parts used + Content-Type: text/rfc822-headers, but text/plain is more widely + rendered, so it is now the standard choice. We accept either as a + Legacy Display part. */ + if (! (g_mime_content_type_is_type (g_mime_object_get_content_type (first), + "text", "plain") || + g_mime_content_type_is_type (g_mime_object_get_content_type (first), + "text", "rfc822-headers"))) return false; protected_header_parameter = g_mime_object_get_content_type_parameter (first, "protected-headers"); if ((! protected_header_parameter) || strcmp (protected_header_parameter, "v1"))