Bug#565981: debbugs: Debbugs::MIME::parse doesn't handle PGP Signed messages with \r correctly
On Wed, 20 Jan 2010, Don Armstrong wrote:
> On Wed, 20 Jan 2010, Mike Hommey wrote:
> > #532828 is an example of a bug with a PGP signed report message with
> > \r. Debbugs::MIME::parse doesn't handle this case correctly, leading
> > to the returned message being empty after it strips off
> > RFC2440-style PGP clearsigning.
> >
> > # Strip off RFC2440-style PGP clearsigning.
> > if (@bodylines and $bodylines[0] =~ /^-----BEGIN PGP SIGNED/) {
> > - shift @bodylines while @bodylines and length $bodylines[0];
> > + shift @bodylines while @bodylines and $bodylines[0] =~ /\S/;
>
> This is too broad. It should be:
> and length $bodylines[0] and $bodylines[0] ne qq(\r);
>
> > shift @bodylines while @bodylines and $bodylines[0] !~ /\S/;
> > for my $findsig (0 .. $#bodylines) {
> > if ($bodylines[$findsig] =~ /^-----BEGIN PGP SIGNATURE/) {
Thanks for the report and patch! I'll try to get it fixed in my tree
and the BTS shortly.
Don Armstrong
--
After the first battle of Sto Lat, I formulated a policy which has
stood me in good stead in other battles. It is this: if an enemy has
an impregnable stronghold, see he stays there.
-- Terry Pratchett _Jingo_ p265
http://www.donarmstrong.com http://rzlab.ucr.edu
Reply to: