From 164988606e964028ac2639e58556625b111407b4 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 23 May 2006 00:31:52 +0000 Subject: 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 --- Bugzilla/BugMail.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index e2beabd91..b2613466a 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'; -- cgit v1.2.3-24-g4f1b