Commit ecaf3819 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 425665: [SECURITY] XSS in show_bug.cgi: id isn't filtered for…

Bug 425665: [SECURITY] XSS in show_bug.cgi: id isn't filtered for format=multiple - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=mkanat r=wurblzap a=LpSolit
parent fd87911b
...@@ -100,7 +100,7 @@ $vars->{'marks'} = \%marks; ...@@ -100,7 +100,7 @@ $vars->{'marks'} = \%marks;
$vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)]; $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
$vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count(); $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); $vars->{'bugids'} = join(", ", @bugids);
# Next bug in list (if there is one) # Next bug in list (if there is one)
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
[% ids = [] %] [% ids = [] %]
[% FOREACH bug = bugs %] [% FOREACH bug = bugs %]
[% PROCESS bug_display %] [% PROCESS bug_display %]
[% ids.push(bug.bug_id) %] [% ids.push(bug.bug_id) UNLESS bug.error %]
[% END %] [% END %]
[% IF ids.size > 1 %] [% IF ids.size > 1 %]
<div class="bz_query_buttons"> <div class="bz_query_buttons">
<form method="post" action="buglist.cgi"> <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"> <input type="submit" id="short_format" value="Short Format">
</form> </form>
</div> </div>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
[% BLOCK bug_display %] [% BLOCK bug_display %]
<h1> <h1>
[% terms.Bug %] [% 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 %] [% IF Param("usebugaliases") AND bug.alias AND NOT bug.error %]
(<a href="show_bug.cgi?id=[% bug.alias FILTER url_quote %]"> (<a href="show_bug.cgi?id=[% bug.alias FILTER url_quote %]">
[% bug.alias FILTER html %]</a>) [% bug.alias FILTER html %]</a>)
......
...@@ -326,7 +326,6 @@ ...@@ -326,7 +326,6 @@
], ],
'bug/show-multiple.html.tmpl' => [ 'bug/show-multiple.html.tmpl' => [
'bug.bug_id',
'attachment.id', 'attachment.id',
'flag.status', 'flag.status',
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment