summaryrefslogtreecommitdiffstats
path: root/pgp.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-12-21 10:13:17 -0800
committerKevin McCarthy <kevin@8t8.us>2018-12-21 10:13:17 -0800
commit450de4637f6590487a073b250da342a1400a3ac3 (patch)
treec7f0636c15dbbc66f798f966123ba301fa553299 /pgp.c
parentf9a6082cb919469e48a19f2a61aa7f2a8e75308d (diff)
Handle improperly encoded pgp/mime octetstream part.
Some clients (or even mail servers) improperly encode the octetstream part. Thanks to Riccardo Schirone for the original merge request patch. This commit also handles the attachment menu, and makes the decoding conditional so it's not done if it isn't necessary.
Diffstat (limited to 'pgp.c')
-rw-r--r--pgp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pgp.c b/pgp.c
index f3ee034f..6224fc32 100644
--- a/pgp.c
+++ b/pgp.c
@@ -1044,7 +1044,12 @@ int pgp_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
int rv = 0;
if (mutt_is_valid_multipart_pgp_encrypted (b))
+ {
b = b->parts->next;
+ /* Some clients improperly encode the octetstream part. */
+ if (b->encoding != ENC7BIT)
+ need_decode = 1;
+ }
else if (mutt_is_malformed_multipart_pgp_encrypted (b))
{
b = b->parts->next->next;