From f6d597b2453ca503ce2c3bff6bbf3a535afe2d12 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 23 Feb 2008 14:53:42 -0800 Subject: [PATCH] - Deal properly with \r line endings (closes: #467190) --- debian/changelog | 1 + scripts/service.in | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index bd75190c..bcbb7fbd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 20 Jun 2003 18:57:25 +0100 diff --git a/scripts/service.in b/scripts/service.in index b89244b8..53058a6f 100755 --- a/scripts/service.in +++ b/scripts/service.in @@ -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; -- 2.39.5