]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 657158 - (CVE-2011-2381) [SECURITY] Request email headers for attachment containi...
authorReed Loden <reed@reedloden.com>
Thu, 4 Aug 2011 19:19:33 +0000 (12:19 -0700)
committerReed Loden <reed@reedloden.com>
Thu, 4 Aug 2011 19:19:33 +0000 (12:19 -0700)
[r=LpSolit a=LpSolit]

Bugzilla/Template.pm
template/en/default/request/email.txt.tmpl

index 64c18c64c63c1a9d63a19086a306cb20c1e46126..527b704b275321c2987c7bff0a5dd52a718dca63 100644 (file)
@@ -695,6 +695,9 @@ sub create {
             # as prefix. In addition it replaces a ' ' by a '_'.
             css_class_quote => \&Bugzilla::Util::css_class_quote ,
 
+            # Removes control characters and trims extra whitespace.
+            clean_text => \&Bugzilla::Util::clean_text ,
+
             quoteUrls => [ sub {
                                my ($context, $bug, $comment) = @_;
                                return sub {
index 72da9ae7350dc2035dbdbd0ae7e7c19ac5e45cb8..fb957484b55c1d60762b418c8e4c5d6ca441b374 100644 (file)
@@ -50,7 +50,7 @@ From: [% Param('mailfrom') %]
 To: [% to %]
 Subject: [% flagtype_name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug_id %]] [% bug.short_desc %]
 [%- IF attachment %] :
-  [Attachment [% attachment.id %]] [% attachment.description %][% END %]
+  [Attachment [% attachment.id %]] [% attachment.description FILTER clean_text %][% END %]
 Date: [% date %]
 X-Bugzilla-Type: request
 [%+ threadingmarker %]