From: lpsolit%gmail.com <> Date: Tue, 23 May 2006 00:31:52 +0000 (+0000) Subject: Bug 331365: Sendmail complains about a possible attack because there's a newline... X-Git-Tag: bugzilla-2.23.2~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=164988606e964028ac2639e58556625b111407b4;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 e2beabd919..b2613466a3 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -682,7 +682,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';