From c775dcf61c6a5e45303684d3cf5a3d27c3730698 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 1 Feb 2010 09:12:32 -0800 Subject: [PATCH] * 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. --- Debbugs/MIME.pm | 9 +++++++-- debian/changelog | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) 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 -- 2.39.2