]> 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:13:13 +0000 (18:13 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 19 Feb 2013 17:13:13 +0000 (18:13 +0100)
r/a=LpSolit

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

index 54f5935a614179efb71a80b5fbc868f6e048bfbf..f0b4ac808c01d29c1edb275601153339c0cf12c7 100644 (file)
@@ -56,6 +56,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 cd8ae211128c429dbb676e7824a5f6b59e67021e..fbdbb85934b3bc3dcb13898b701763b312a65e3b 100755 (executable)
@@ -736,7 +736,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 1ea2f5edff31e028f0909c8e8c5ba29196c2b1bc..0e29d59d7734f1eb8bb8f147fccf224c2644a493 100755 (executable)
@@ -257,7 +257,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?",