]> git.donarmstrong.com Git - debbugs.git/commitdiff
- Deal properly with \r line endings (closes: #467190)
authorDon Armstrong <don@donarmstrong.com>
Sat, 23 Feb 2008 22:53:42 +0000 (14:53 -0800)
committerDon Armstrong <don@donarmstrong.com>
Sat, 23 Feb 2008 22:53:42 +0000 (14:53 -0800)
debian/changelog
scripts/service.in

index bd75190c33002228fe09befa4f0e2b1b53c53a88..bcbb7fbd82439fc133a87509f3ef363eefcf501b 100644 (file)
@@ -212,6 +212,7 @@ debbugs (2.4.2) UNRELEASED; urgency=low
     - Make search case insensitive (closes: #448861)
     - Add the ability to return source/package mapping
       (closes: #465332,#458822)
+    - Deal properly with \r line endings (closes: #467190)
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100
index b89244b813ae220ff07bd7cb6ea1149d7862bed1..53058a6fddb9a24b612fb243c2bee808d314cae7 100755 (executable)
@@ -61,12 +61,13 @@ my (@headerlines, @bodylines);
 my (%bug_affected);
 
 if ($entity and $entity->head->tags) {
-    @headerlines = @{$entity->head->header};
-    chomp @headerlines;
+    # Use map instead of chomp to also kill \r.
+    @headerlines = map {s/\r?\n?$//; $_;}
+        @{$entity->head->header};
 
     my $entity_body = getmailbody($entity);
-    @bodylines = $entity_body ? $entity_body->as_lines() : ();
-    chomp @bodylines;
+    @bodylines = map {s/\r\n$//; $_;}
+        $entity_body ? $entity_body->as_lines() : ();
 } else {
     # Legacy pre-MIME code, kept around in case MIME::Parser fails.
     my $i;