]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 331365: Sendmail complains about a possible attack because there's a newline...
authorlpsolit%gmail.com <>
Tue, 23 May 2006 00:33:55 +0000 (00:33 +0000)
committerlpsolit%gmail.com <>
Tue, 23 May 2006 00:33:55 +0000 (00:33 +0000)
Bugzilla/BugMail.pm

index e4a19d65fb68e1bafee95881606803be14a73c0c..6a8afce7fdd71033532e320adb22ef4c00aae169 100644 (file)
@@ -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';