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.
(cherry picked from commit
450de4637f6590487a073b250da342a1400a3ac3)
first_part->warnsig = 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;
BODY *octetstream;
octetstream = b->parts->next;
- 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;
return rc;
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;