]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 425665: [SECURITY] XSS in show_bug.cgi: id isn't filtered for format=multiple...
authorlpsolit%gmail.com <>
Mon, 5 May 2008 05:05:48 +0000 (05:05 +0000)
committerlpsolit%gmail.com <>
Mon, 5 May 2008 05:05:48 +0000 (05:05 +0000)
show_bug.cgi
template/en/default/bug/show-multiple.html.tmpl
template/en/default/filterexceptions.pl

index 4e3aac982f47be1d1ba0f3134896a23da5008458..782293af5ac0d8f2524528f2f6ee47dd05c81ded 100755 (executable)
@@ -100,7 +100,7 @@ $vars->{'marks'} = \%marks;
 $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
 $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
 
-my @bugids = map {$_->bug_id} @bugs;
+my @bugids = map {$_->bug_id} grep {!$_->error} @bugs;
 $vars->{'bugids'} = join(", ", @bugids);
 
 # Next bug in list (if there is one)
index 2562903a6024b9f1252c05075110942aeb83870d..1442cae4f86c51b7da7473ea24b6a4be3ba9e35f 100644 (file)
   [% ids = [] %]
   [% FOREACH bug = bugs %]
     [% PROCESS bug_display %]
-    [% ids.push(bug.bug_id) %]
+    [% ids.push(bug.bug_id) UNLESS bug.error %]
   [% END %]
   [% IF ids.size > 1 %]
     <div class="bz_query_buttons">
       <form method="post" action="buglist.cgi">
-        <input type="hidden" name="bug_id" value="[% ids.join(",") FILTER none %]">
+        <input type="hidden" name="bug_id" value="[% ids.join(",") FILTER html %]">
         <input type="submit" id="short_format" value="Short Format">
       </form>
     </div>
@@ -63,7 +63,7 @@
 [% BLOCK bug_display %]
   <h1>
     [% terms.Bug %] 
-    <a href="show_bug.cgi?id=[% bug.bug_id %]">[% bug.bug_id %]</a>
+    <a href="show_bug.cgi?id=[% bug.bug_id FILTER html %]">[% bug.bug_id FILTER html %]</a>
     [% IF Param("usebugaliases") AND bug.alias AND NOT bug.error %]
       (<a href="show_bug.cgi?id=[% bug.alias FILTER url_quote %]">
         [% bug.alias FILTER html %]</a>)
index 2fb8b48e09c7cf836fad6b4a2dd63f69ff5729b4..c25e400c3f4763d290c6412a6af60692482f704c 100644 (file)
 ],
 
 'bug/show-multiple.html.tmpl' => [
-  'bug.bug_id', 
   'attachment.id', 
   'flag.status',
 ],