]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Handle \r properly in Debbugs::MIME for PGP signatures
authorDon Armstrong <don@donarmstrong.com>
Mon, 1 Feb 2010 17:12:32 +0000 (09:12 -0800)
committerDon Armstrong <don@donarmstrong.com>
Mon, 1 Feb 2010 17:12:32 +0000 (09:12 -0800)
  (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
debian/changelog

index 2e1d611c94a8085524633d3aaa37d78cf194246d..95dafb8dc5075ed9a515143c00dd8e584e653bb0 100644 (file)
@@ -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/) {
index b8c23045ad7e7190be85790a35e47003e6554895..4618e6e7fad3105e68cb572a1a5989ecd60bfb60 100644 (file)
@@ -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 <don@debian.org>  Wed, 26 Aug 2009 21:32:53 -0700