Re: mutt/2139: messages with base64-encoded CRLF pgp bits can't be read
The following reply was made to PR mutt/2139; it has been noted by GNATS.
From: Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc:
Subject: Re: mutt/2139: messages with base64-encoded CRLF pgp bits can't be read
Date: Tue, 22 Nov 2005 13:21:22 +0100
On 2005-11-22 13:13:12 +0100, Thomas Roessler wrote:
> The problem seems to be that mutt's MIME handler doesn't apply
> text-mode rules to CRLFs in application/pgp messages, even though it
> should. (Another reason why application/pgp is a bad thing in the
> first place.)
And there I went into my own trap (which is, indeed, still another
reason why application/pgp and other non-MIME-related PGP
integrations are bad).
Here's the correct patch:
diff -u -r3.23 handler.c
--- handler.c 21 Oct 2005 04:35:37 -0000 3.23
+++ handler.c 22 Nov 2005 12:20:46 -0000
@@ -1754,16 +1754,16 @@
switch (b->encoding)
{
case ENCQUOTEDPRINTABLE:
- mutt_decode_quoted (s, b->length, istext, cd);
+ mutt_decode_quoted (s, b->length, istext || ((WithCrypto &
APPLICATION_PGP) && mutt_is_application_pgp (b)), cd);
break;
case ENCBASE64:
- mutt_decode_base64 (s, b->length, istext, cd);
+ mutt_decode_base64 (s, b->length, istext || ((WithCrypto &
APPLICATION_PGP) && mutt_is_application_pgp (b)), cd);
break;
case ENCUUENCODED:
- mutt_decode_uuencoded (s, b->length, istext, cd);
+ mutt_decode_uuencoded (s, b->length, istext || ((WithCrypto &
APPLICATION_PGP) && mutt_is_application_pgp (b)), cd);
break;
default:
- mutt_decode_xbit (s, b->length, istext, cd);
+ mutt_decode_xbit (s, b->length, istext || ((WithCrypto &
APPLICATION_PGP) && mutt_is_application_pgp (b)), cd);
break;
}
--
Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>