summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-08-12 17:27:34 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-08-12 17:27:34 +0200
commitafa23774e953411a0b7ad73739970d5b81495195 (patch)
treee8b1c7beaaab36caf5b464b082993184b0d06f5e /Bugzilla/User.pm
parent8adaad7fda9776639d06f97703e2984e376232dc (diff)
downloadbugzilla-afa23774e953411a0b7ad73739970d5b81495195.tar.gz
bugzilla-afa23774e953411a0b7ad73739970d5b81495195.tar.xz
Bug 899537 - backport upstream bug 897029 to bmo/4.2 for performance improvement
r=glob
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index bd7c8123b..f1803ac79 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -892,6 +892,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) {