From: lpsolit%gmail.com <> Date: Tue, 23 May 2006 00:33:55 +0000 (+0000) Subject: Bug 331365: Sendmail complains about a possible attack because there's a newline... X-Git-Tag: bugzilla-2.22.1~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f6a1ff3af96c6443ea9c6ed9858ad002772b08d;p=thirdparty%2Fbugzilla.git Bug 331365: Sendmail complains about a possible attack because there's a newline in the email address - Patch by Teemu Mannermaa r=glob a=justdave --- diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index e4a19d65fb..6a8afce7fd 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -641,7 +641,8 @@ sub MessageToMTA { $headers = new Mail::Header \@header_lines, Modify => 0; } - my $from = $headers->get('from'); + # Use trim to remove any whitespace (incl. newlines) + my $from = trim($headers->get('from')); if (Param("mail_delivery_method") eq "sendmail" && $^O =~ /MSWin32/i) { my $cmd = '|' . SENDMAIL_EXE . ' -t -i';