]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 529416: (CVE-2009-3386) [SECURITY] Dependency lists display bug aliases even...
authormkanat%bugzilla.org <>
Thu, 19 Nov 2009 02:09:45 +0000 (02:09 +0000)
committermkanat%bugzilla.org <>
Thu, 19 Nov 2009 02:09:45 +0000 (02:09 +0000)
Patch by Dave Miller <justdave@bugzilla.org> r=LpSolit, r=mkanat, a=mkanat

Bugzilla/Template.pm

index ba0a035bbe6be718c26910e6e21d7a7a96e97de7..17429a2e2eec72b33fb39a2f4a18c83b526275ed 100644 (file)
@@ -348,10 +348,6 @@ sub get_bug_link {
     $bug = blessed($bug) ? $bug : new Bugzilla::Bug($bug);
     return $link_text if $bug->{error};
     
-    if ($options->{use_alias} && $link_text =~ /^\d+$/ && $bug->alias) {
-        $link_text = $bug->alias;
-    }
-
     # Initialize these variables to be "" so that we don't get warnings
     # if we don't change them below (which is highly likely).
     my ($pre, $title, $post) = ("", "", "");
@@ -369,6 +365,9 @@ sub get_bug_link {
     }
     if (Bugzilla->user->can_see_bug($bug)) {
         $title .= " - " . $bug->short_desc;
+        if ($options->{use_alias} && $link_text =~ /^\d+$/ && $bug->alias) {
+            $link_text = $bug->alias;
+        }
     }
     # Prevent code injection in the title.
     $title = html_quote(clean_text($title));