From: cjwatson <> Date: Thu, 5 Aug 2004 22:09:30 +0000 (-0800) Subject: [project @ 2004-08-05 15:09:30 by cjwatson] X-Git-Tag: release/2.6.0~745 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=aca80d5890ef1ed561bbbf33c555bef93a1cea4b;p=debbugs.git [project @ 2004-08-05 15:09:30 by cjwatson] Cope with empty Reply-To: header (#263741). --- diff --git a/scripts/process.in b/scripts/process.in index 8bc23501..267d77f9 100755 --- a/scripts/process.in +++ b/scripts/process.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: process.in,v 1.85 2004/02/27 02:05:17 cjwatson Exp $ +# $Id: process.in,v 1.86 2004/08/05 15:09:30 cjwatson Exp $ # # Usage: process nn # Temps: incoming/Pnn @@ -152,7 +152,14 @@ if (defined $header{'resent-from'} && !defined $header{'from'}) { $header{'from'} = $header{'resent-from'}; } defined($header{'from'}) || &quit("no From header"); -$replyto= defined($header{'reply-to'}) ? $header{'reply-to'} : $header{'from'}; + +$replyto = $header{'reply-to'}; +$replyto = '' unless defined $replyto; +$replyto =~ s/^ +//; +$replyto =~ s/ +$//; +unless (length $replyto) { + $replyto = $header{'from'}; +} $_= $replyto; $_= "$2 <$1>" if m/^([^\<\> \t\n\(\)]+) \(([^\(\)\<\>]+)\)$/;