From: Don Armstrong Date: Mon, 1 Feb 2010 17:12:32 +0000 (-0800) Subject: * Handle \r properly in Debbugs::MIME for PGP signatures X-Git-Tag: release/2.6.0~428^2~8 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=c775dcf61c6a5e45303684d3cf5a3d27c3730698 * Handle \r properly in Debbugs::MIME for PGP signatures (closes: #565981). Thanks to Mike Hommey * Allow type to be text as well as text/(something not html) (closes: #566068). Thanks to Mike Hommey. --- diff --git a/Debbugs/MIME.pm b/Debbugs/MIME.pm index 2e1d611..95dafb8 100644 --- a/Debbugs/MIME.pm +++ b/Debbugs/MIME.pm @@ -58,7 +58,7 @@ sub getmailbody my $entity = shift; my $type = $entity->effective_type; if ($type eq 'text/plain' or - ($type =~ m#text/# and $type ne 'text/html') or + ($type =~ m#text/?# and $type ne 'text/html') or $type eq 'application/pgp') { return $entity->bodyhandle; } elsif ($type eq 'multipart/alternative') { @@ -120,7 +120,12 @@ sub parse # 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 + length $bodylines[0] and + # we currently don't strip \r; handle this for the + # time being, though eventually it should be stripped + # too, I think. [See #565981] + $bodylines[0] ne "\r"; shift @bodylines while @bodylines and $bodylines[0] !~ /\S/; for my $findsig (0 .. $#bodylines) { if ($bodylines[$findsig] =~ /^-----BEGIN PGP SIGNATURE/) { diff --git a/debian/changelog b/debian/changelog index b8c2304..4618e6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,10 @@ debbugs (2.4.2~exp1) experimental; urgency=low * Ditch \r and \n in status fields (closes: #545895) * Properly handle source packages when searching by maintainer; use package_maintainer instead of the hashes (closes: #556863) + * Handle \r properly in Debbugs::MIME for PGP signatures + (closes: #565981). Thanks to Mike Hommey + * Allow type to be text as well as text/(something not html) + (closes: #566068). Thanks to Mike Hommey. -- Don Armstrong Wed, 26 Aug 2009 21:32:53 -0700