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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
89e86c93
Commit
89e86c93
authored
May 21, 2012
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 754090: Bugzilla::FlagType::match() crashes when the group parameter is not a number
a=LpSolit
parent
cb114a08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
FlagType.pm
Bugzilla/FlagType.pm
+12
-2
editflagtypes.cgi
editflagtypes.cgi
+3
-0
No files found.
Bugzilla/FlagType.pm
View file @
89e86c93
...
...
@@ -664,7 +664,10 @@ sub sqlify_criteria {
}
if
(
$criteria
->
{
product_id
})
{
my
$product_id
=
$criteria
->
{
product_id
};
detaint_natural
(
$product_id
)
||
ThrowCodeError
(
'bad_arg'
,
{
argument
=>
'product_id'
,
function
=>
'Bugzilla::FlagType::sqlify_criteria'
});
# Add inclusions to the query, which simply involves joining the table
# by flag type ID and target product/component.
push
(
@$tables
,
"INNER JOIN flaginclusions AS i ON flagtypes.id = i.type_id"
);
...
...
@@ -681,6 +684,10 @@ sub sqlify_criteria {
my
$addl_join_clause
=
""
;
if
(
$criteria
->
{
component_id
})
{
my
$component_id
=
$criteria
->
{
component_id
};
detaint_natural
(
$component_id
)
||
ThrowCodeError
(
'bad_arg'
,
{
argument
=>
'component_id'
,
function
=>
'Bugzilla::FlagType::sqlify_criteria'
});
push
(
@criteria
,
"(i.component_id = $component_id OR i.component_id IS NULL)"
);
$join_clause
.=
"AND (e.component_id = $component_id OR e.component_id IS NULL) "
;
}
...
...
@@ -694,7 +701,10 @@ sub sqlify_criteria {
}
if
(
$criteria
->
{
group
})
{
my
$gid
=
$criteria
->
{
group
};
detaint_natural
(
$gid
);
detaint_natural
(
$gid
)
||
ThrowCodeError
(
'bad_arg'
,
{
argument
=>
'group'
,
function
=>
'Bugzilla::FlagType::sqlify_criteria'
});
push
(
@criteria
,
"(flagtypes.grant_group_id = $gid "
.
" OR flagtypes.request_group_id = $gid)"
);
}
...
...
editflagtypes.cgi
View file @
89e86c93
...
...
@@ -141,6 +141,9 @@ if ($action eq 'list') {
my
$component_id
=
$component
?
$component
->
id
:
0
;
my
$show_flag_counts
=
$cgi
->
param
(
'show_flag_counts'
)
?
1
:
0
;
my
$group_id
=
$cgi
->
param
(
'group'
);
if
(
$group_id
)
{
detaint_natural
(
$group_id
)
||
ThrowUserError
(
'invalid_group_ID'
);
}
my
$bug_flagtypes
;
my
$attach_flagtypes
;
...
...
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