tags 457537 + patch
thanks
The attached patch fixes bug #457537. I've also slightly modified the
test cases to check for this bug.
Regards, Simon Kainz
Only in libmail-mboxparser-perl-0.55: Makefile.old
diff -ur libmail-mboxparser-perl-0.55_orig/MboxParser/Mail.pm libmail-mboxparser-perl-0.55/MboxParser/Mail.pm
--- libmail-mboxparser-perl-0.55_orig/MboxParser/Mail.pm 2008-11-28 17:50:44.000000000 +0100
+++ libmail-mboxparser-perl-0.55/MboxParser/Mail.pm 2008-11-28 17:55:51.000000000 +0100
@@ -983,10 +983,16 @@
my ($key, $value);
my %header;
for (@header) {
- if (/^Received:\s/) { push @{$self->{TRACE}}, substr($_, 10) }
+ if (/^Received:\s*/) { push @{$self->{TRACE}}, substr($_, 10) }
elsif (/^From /) { $self->{FROM} = $_ }
else {
+ my $idxlen=2;
my $idx = index $_, ": ";
+ if ($idx ==-1)
+ {
+ $idx=index $_, ":";
+ $idxlen=1;
+ }
$key = substr $_, 0, $idx;
$value = $idx != -1 ? substr $_, $idx + 2 : "";
if ($decode eq 'ALL' || $decode eq 'HEADER') {
diff -ur libmail-mboxparser-perl-0.55_orig/t/testbox libmail-mboxparser-perl-0.55/t/testbox
--- libmail-mboxparser-perl-0.55_orig/t/testbox 2008-11-28 17:50:44.000000000 +0100
+++ libmail-mboxparser-perl-0.55/t/testbox 2008-11-28 17:52:53.000000000 +0100
@@ -1,6 +1,6 @@
From [EMAIL PROTECTED] Thu Feb 26 17:23:40 1998
-Received: from dnstx.unitedspacealliance.com (dnstx.unitedspacealliance.com [161.40.254.10])
+Received:from dnstx.unitedspacealliance.com (dnstx.unitedspacealliance.com [161.40.254.10])
by python.org (8.8.5/8.8.5) with SMTP id RAA24304
for <[EMAIL PROTECTED]>; Thu, 26 Feb 1998 17:23:40 -0500 (EST)
Received: from pythonpros.com by dnstx.unitedspacealliance.com (SMI-8.6/SMI-SVR4)
@@ -11,8 +11,8 @@
Organization: Python Professional Services, Inc.
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
-To: [EMAIL PROTECTED]
-Subject: List entry indexing
+To:[EMAIL PROTECTED]
+Subject:List entry indexing
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit