Commit 1741f7c9 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 417048: (CVE-2010-2756) [SECURITY] Boolean charts let me query for users…

Bug 417048: (CVE-2010-2756) [SECURITY] Boolean charts let me query for users being in any given group r=mkanat a=LpSolit
parent 14242731
......@@ -1856,10 +1856,14 @@ sub _contact_exact_group {
my ($value, $operator, $field, $chart_id, $joins) =
@$args{qw(value operator field chart_id joins)};
my $dbh = Bugzilla->dbh;
my $user = $self->_user;
$value =~ /\%group\.([^%]+)%/;
my $group = Bugzilla::Group->check($1);
$group->check_members_are_visible();
$user->in_group($group)
|| ThrowUserError('invalid_group_name', {name => $group->name});
my $group_ids = Bugzilla::Group->flatten_group_membership($group->id);
my $table = "user_group_map_$chart_id";
my $join = {
......@@ -1904,6 +1908,9 @@ sub _cc_exact_group {
$value =~ m/%group\.([^%]+)%/;
my $group = Bugzilla::Group->check($1);
$group->check_members_are_visible();
$user->in_group($group)
|| ThrowUserError('invalid_group_name', {name => $group->name});
my $all_groups = Bugzilla::Group->flatten_group_membership($group->id);
# This is for the email1, email2, email3 fields from query.cgi.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment