]> 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:21:36 +0000 (12:21 -0700)
committerReed Loden <reed@reedloden.com>
Thu, 4 Aug 2011 19:21:36 +0000 (12:21 -0700)
[r=LpSolit a=LpSolit]

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

index 3ebda68efaccae39efe30f1af6545b7bbe32c1c8..cc3d006135aa439b3b4a1f2328ef2640445640d5 100644 (file)
@@ -688,6 +688,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 182ac09e0ad2ce1418334efa113d0f48eee997b6..b7a9932e41bdcbaf03db85ccad42d896e65ef4af 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 %]