Commit 4d1a1df8 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 783794: Bugzilla::User->visible_bugs should validate input data

r=glob a=LpSolit
parent 14754acd
......@@ -883,6 +883,14 @@ sub visible_bugs {
if (@check_ids) {
my $dbh = Bugzilla->dbh;
my $user_id = $self->id;
foreach my $id (@check_ids) {
my $orig_id = $id;
detaint_natural($id)
|| ThrowCodeError('param_must_be_numeric', { param => $orig_id,
function => 'Bugzilla::User->visible_bugs'});
}
my $sth;
# Speed up the can_see_bug case.
if (scalar(@check_ids) == 1) {
......
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