Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
51ec5716
Commit
51ec5716
authored
Nov 13, 2012
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 781850 (CVE-2012-4198): [SECURITY] Do not leak the existence of groups when using User.get()
r=dkl a=LpSolit
parent
7a8e966a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
Constants.pm
Bugzilla/WebService/Constants.pm
+1
-0
User.pm
Bugzilla/WebService/User.pm
+25
-11
No files found.
Bugzilla/WebService/Constants.pm
View file @
51ec5716
...
...
@@ -156,6 +156,7 @@ use constant WS_ERROR_CODE => {
group_exists
=>
801
,
empty_group_description
=>
802
,
invalid_regexp
=>
803
,
invalid_group_name
=>
804
,
# Classification errors are 900-1000
auth_classification_not_enabled
=>
900
,
...
...
Bugzilla/WebService/User.pm
View file @
51ec5716
...
...
@@ -309,17 +309,23 @@ sub _filter_users_by_group {
# If no groups are specified, we return all users.
return
$users
if
(
!
$group_ids
and
!
$group_names
);
my
@groups
=
map
{
Bugzilla::
Group
->
check
({
id
=>
$_
})
}
@
{
$group_ids
||
[]
};
my
@name_groups
=
map
{
Bugzilla::
Group
->
check
(
$_
)
}
@
{
$group_names
||
[]
};
my
%
unique_groups
;
foreach
my
$group
(
@groups
,
@name_groups
)
{
$unique_groups
{
$group
->
id
}
||=
$group
;
my
$user
=
Bugzilla
->
user
;
my
(
@groups
,
%
groups
);
if
(
$group_ids
)
{
@groups
=
map
{
Bugzilla::
Group
->
check
({
id
=>
$_
})
}
@$group_ids
;
$groups
{
$_
->
id
}
=
$_
foreach
@groups
;
}
if
(
$group_names
)
{
foreach
my
$name
(
@$group_names
)
{
my
$group
=
Bugzilla::
Group
->
check
({
name
=>
$name
,
_error
=>
'invalid_group_name'
});
$user
->
in_group
(
$group
)
||
ThrowUserError
(
'invalid_group_name'
,
{
name
=>
$name
});
$groups
{
$group
->
id
}
=
$group
;
}
}
@groups
=
values
%
groups
;
my
@in_group
=
grep
{
$self
->
_user_in_any_group
(
$_
,
[
values
%
unique_groups
])
}
@$users
;
my
@in_group
=
grep
{
$self
->
_user_in_any_group
(
$_
,
\
@groups
)
}
@$users
;
return
\
@in_group
;
}
...
...
@@ -874,10 +880,10 @@ querying your own account, even if you are in the editusers group.
=over
=item 51 (Bad Login Name or Group
Name
)
=item 51 (Bad Login Name or Group
ID
)
You passed an invalid login name in the "names" array or a bad
group
name/id in the C<groups>/C<group_ids> arguments
.
group
ID in the C<group_ids> argument
.
=item 304 (Authorization Required)
...
...
@@ -889,6 +895,11 @@ wanted to get information about by user id.
Logged-out users cannot use the "ids" or "match" arguments to this
function.
=item 804 (Invalid Group Name)
You passed a group name in the C<groups> argument which either does not
exist or you do not belong to it.
=back
=item B<History>
...
...
@@ -902,6 +913,9 @@ function.
=item C<include_disabled> was added in Bugzilla B<4.0>. Default
behavior for C<match> was changed to only return enabled accounts.
=item Error 804 has been added in Bugzilla 4.0.9 and 4.2.4. It's now
illegal to pass a group name you don't belong to.
=item C<groups>, C<saved_searches>, and C<saved_reports> were added
in Bugzilla B<4.4>.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment