]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 824399: (CVE-2013-0786) [SECURITY] build_subselect() leaks the existence of produ...
authorSimon Green <sgreen@redhat.com>
Tue, 19 Feb 2013 17:11:40 +0000 (18:11 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 19 Feb 2013 17:11:40 +0000 (18:11 +0100)
r/a=LpSolit

Bugzilla/Config/GroupSecurity.pm
buglist.cgi
report.cgi
template/en/default/admin/params/groupsecurity.html.tmpl

index d5f02f42dad49f905e8d0d768151c40e36f7c833..d57573de332ef43ac8276a9265060e39333fd9b7 100644 (file)
@@ -57,6 +57,14 @@ sub get_param_list {
    checker => \&check_group
   },
   
+  {
+   name => 'debug_group',
+   type => 's',
+   choices => \&_get_all_group_names,
+   default => 'admin',
+   checker => \&check_group
+  },
+  
   {
    name => 'usevisibilitygroups',
    type => 'b',
index 625b7eab86343de1a853d64b7ff71260537835e3..97654cdf2549f6bc887a83b443ca42cd80fdfd25 100755 (executable)
@@ -721,7 +721,10 @@ $::SIG{PIPE} = 'DEFAULT';
 my ($data, $extra_data) = $search->data;
 $vars->{'search_description'} = $search->search_description;
 
-if ($cgi->param('debug')) {
+if ($cgi->param('debug')
+    && Bugzilla->params->{debug_group}
+    && $user->in_group(Bugzilla->params->{debug_group})
+) {
     $vars->{'debug'} = 1;
     $vars->{'queries'} = $extra_data;
     my $query_time = 0;
index 2949a18c32a7fe4074fc329e1e18d0fb3b8d2e15..5e51bd34a6b6ca21c799e8020148c2938ca612ab 100755 (executable)
@@ -258,7 +258,13 @@ $vars->{'width'} = $width;
 $vars->{'height'} = $height;
 $vars->{'queries'} = $extra_data;
 $vars->{'saved_report_id'} = $cgi->param('saved_report_id');
-$vars->{'debug'} = $cgi->param('debug');
+
+if ($cgi->param('debug')
+    && Bugzilla->params->{debug_group}
+    && Bugzilla->user->in_group(Bugzilla->params->{debug_group})
+) {
+    $vars->{'debug'} = 1;
+}
 
 if ($action eq "wrap") {
     # So which template are we using? If action is "wrap", we will be using
index 86cbedcf81908745a44542f6094861643803b48c..7e30f072382655abfb1aa59621f0d79b974ad56c 100644 (file)
@@ -29,6 +29,9 @@
   querysharegroup => "The name of the group of users who can share their " _
                      "saved searches with others.",
 
+  debug_group => "The name of the group of users who can view the actual " _
+                 "SQL query generated when viewing $terms.bug lists and reports.",
+
   usevisibilitygroups => "Do you wish to restrict visibility of users to members of " _
                          "specific groups?",