]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1229894 - Backport bug upstream 1221518 to bmo/4.2 [SECURITY] XSS in dependency...
authorDavid Lawrence <dkl@mozilla.com>
Wed, 23 Dec 2015 03:23:34 +0000 (03:23 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Wed, 23 Dec 2015 03:23:34 +0000 (03:23 +0000)
showdependencygraph.cgi

index 4fc1b9386cb1f5639b1765ae3fb04ff8694dc105..24f3b846949d757294ba31c313411fd9932fcceb 100755 (executable)
@@ -74,7 +74,7 @@ sub CreateImagemap {
             # Pick up bugid from the mapdata label field. Getting the title from
             # bugtitle hash instead of mapdata allows us to get the summary even
             # when showsummary is off, and also gives us status and resolution.
-            my $bugtitle = html_quote(clean_text($bugtitles{$bugid}));
+            my $bugtitle = $bugtitles{$bugid};
             $map .= qq{<area alt="bug $bugid" name="bug$bugid" shape="rect" } .
                     qq{title="$bugtitle" href="$url" } .
                     qq{coords="$leftx,$topy,$rightx,$bottomy">\n};
@@ -190,13 +190,16 @@ foreach my $k (keys(%seen)) {
     # Retrieve bug information from the database
     my ($stat, $resolution, $summary) = $dbh->selectrow_array($sth, undef, $k);
 
+    $vars->{'short_desc'} = $summary if ($k eq $cgi->param('id'));
+
     # Resolution and summary are shown only if user can see the bug
-    if (!Bugzilla->user->can_see_bug($k)) {
+    if (Bugzilla->user->can_see_bug($k)) {
+        $summary = html_quote(clean_text($summary));
+    }
+    else {
         $resolution = $summary = '';
     }
 
-    $vars->{'short_desc'} = $summary if ($k eq $cgi->param('id'));
-
     my @params;
 
     if ($summary ne "" && $cgi->param('showsummary')) {