Subject: bug#9862: 23.3; [Gnus/EasyPG] Mixing PGP/MIME signature with RFC822 forwarded multipart message results in an invalid MIME message

From: Andreas Schwab <[email-masked]>
Date: Tue, 25 Oct 2011 19:01:19 +0200

Daiki Ueno <[email-masked]> writes:

> Well, I couldn't actually reproduce it.  With the MML from the Debian
> bug and got the following.  The boundary strings look legal, but
> interestingly the rendering seems to be broken.  I see
> "--====-=-=--\n----------\n" after the line "Foo".
>
>  From nobody Tue Oct 25 17:04:52 2011
>  Message-ID: <[email-masked]>
>  From: Daiki Ueno <[email-masked]>
>  To: [email-masked]
>  Subject: test
>  Date: Tue, 25 Oct 2011 17:04:45 +0900
>  MIME-Version: 1.0
>  Content-Type: multipart/signed; boundary="=====-=-=";
>  	micalg=pgp-sha1; protocol="application/pgp-signature"
>  Lines: 39
>  Xref: localhost.localdomain outgoing.gpg:392
>  X-Gnus-Article-Number: 392   Tue, 25 Oct 2011 17:04:52 +0900
>
>  --=====-=-=
>  Content-Type: multipart/mixed; boundary="=-=-="
>
>  --=-=-=
>  Content-Type: message/rfc822
>  Content-Disposition: inline
>
>  --====-=-=
>  Content-Disposition: inline
>  MIME-Version: 1.0
>  Content-Type: multipart/mixed; boundary="====-=-="
>
>  Foo
>
>  --====-=-=--

This part is wrong.  The boundary line "--====-=-=" needs to be moved
after the rfc822 headers, like this:

 --=-=-=
 Content-Type: message/rfc822
 Content-Disposition: inline

 Content-Disposition: inline
 MIME-Version: 1.0
 Content-Type: multipart/mixed; boundary="====-=-="

 --====-=-=
 Foo

 --====-=-=--

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."