diff options
author | Kevin McCarthy <kevin@8t8.us> | 2018-12-21 10:13:17 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2018-12-21 10:13:17 -0800 |
commit | 450de4637f6590487a073b250da342a1400a3ac3 (patch) | |
tree | c7f0636c15dbbc66f798f966123ba301fa553299 /handler.c | |
parent | f9a6082cb919469e48a19f2a61aa7f2a8e75308d (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 'handler.c')
-rw-r--r-- | handler.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1701,7 +1701,11 @@ static int valid_pgp_encrypted_handler (BODY *b, STATE *s) mutt_free_envelope (&b->mime_headers); mutt_free_envelope (&octetstream->mime_headers); - rc = crypt_pgp_encrypted_handler (octetstream, s); + /* Some clients improperly encode the octetstream part. */ + if (octetstream->encoding != ENC7BIT) + rc = run_decode_and_handler (octetstream, s, crypt_pgp_encrypted_handler, 0); + else + rc = crypt_pgp_encrypted_handler (octetstream, s); b->goodsig |= octetstream->goodsig; /* Relocate protected headers onto the multipart/encrypted part */ |