From: Simon Green Date: Tue, 19 Feb 2013 17:13:13 +0000 (+0100) Subject: Bug 824399: (CVE-2013-0786) [SECURITY] build_subselect() leaks the existence of produ... X-Git-Tag: bugzilla-4.4rc2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3ecc440b5f77f71b450e7e552891f3e7a0e42ea;p=thirdparty%2Fbugzilla.git Bug 824399: (CVE-2013-0786) [SECURITY] build_subselect() leaks the existence of products and components you cannot access r/a=LpSolit --- diff --git a/Bugzilla/Config/GroupSecurity.pm b/Bugzilla/Config/GroupSecurity.pm index 54f5935a61..f0b4ac808c 100644 --- a/Bugzilla/Config/GroupSecurity.pm +++ b/Bugzilla/Config/GroupSecurity.pm @@ -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', diff --git a/buglist.cgi b/buglist.cgi index cd8ae21112..fbdbb85934 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -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; diff --git a/report.cgi b/report.cgi index 1ea2f5edff..0e29d59d77 100755 --- a/report.cgi +++ b/report.cgi @@ -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 diff --git a/template/en/default/admin/params/groupsecurity.html.tmpl b/template/en/default/admin/params/groupsecurity.html.tmpl index 86cbedcf81..7e30f07238 100644 --- a/template/en/default/admin/params/groupsecurity.html.tmpl +++ b/template/en/default/admin/params/groupsecurity.html.tmpl @@ -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?",