From 4d1a1df823cd3690ff14b2579291182d6dbf7934 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 13 Sep 2012 01:44:01 +0200 Subject: Bug 783794: Bugzilla::User->visible_bugs should validate input data r=glob a=LpSolit --- Bugzilla/User.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 87255b20a..9fa7458e7 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -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) { -- cgit v1.2.3-24-g4f1b