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

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

index f3fc1b82d35c53648464cdd93b8c1f85a7f45c35..bb5ff5eda742717984406e995c29d887f95f762c 100644 (file)
@@ -549,6 +549,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 e48b2fc1335178269977958205a3b6134c3bfeab..20e7ef5ac0b4debf2c0f68c5cce5f9a646c5bbce 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 %]
 X-Bugzilla-Type: request
 [%+ threadingmarker %]