From 9f6a1ff3af96c6443ea9c6ed9858ad002772b08d Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 23 May 2006 00:33:55 +0000 Subject: [PATCH] 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(-) 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'; -- 2.47.2