summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-05-23 02:31:52 +0200
committerlpsolit%gmail.com <>2006-05-23 02:31:52 +0200
commit164988606e964028ac2639e58556625b111407b4 (patch)
treeece8ba8d9d1d1b03c240f4a3370b9096723708dd
parentad75173f2de10be06dbff75b1c20c30883fd39b0 (diff)
downloadbugzilla-164988606e964028ac2639e58556625b111407b4.tar.gz
bugzilla-164988606e964028ac2639e58556625b111407b4.tar.xz
Bug 331365: Sendmail complains about a possible attack because there's a newline in the email address - Patch by Teemu Mannermaa <wicked+bz@etlicon.fi> r=glob a=justdave
-rw-r--r--Bugzilla/BugMail.pm3
1 files changed, 2 insertions, 1 deletions
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';