From c1ca86053ed276aa05eac8468cea61785629ac5e Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 30 Jun 2008 02:57:54 +0000 Subject: Bug 440612 – Use Bugzilla::Bug->check everywhere instead of ValidateBugID Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process_bug.cgi | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'process_bug.cgi') diff --git a/process_bug.cgi b/process_bug.cgi index bb680fab2..814ff5612 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -112,23 +112,16 @@ sub should_set { # Create a list of objects for all bugs being modified in this request. my @bug_objects; if (defined $cgi->param('id')) { - my $id = $cgi->param('id'); - ValidateBugID($id); - - # Store the validated, and detainted id back in the cgi data, as - # lots of later code will need it, and will obtain it from there - $cgi->param('id', $id); - push(@bug_objects, new Bugzilla::Bug($id)); + my $bug = Bugzilla::Bug->check(scalar $cgi->param('id')); + $cgi->param('id', $bug->id); + push(@bug_objects, $bug); } else { - my @ids; foreach my $i ($cgi->param()) { if ($i =~ /^id_([1-9][0-9]*)/) { my $id = $1; - ValidateBugID($id); - push(@ids, $id); + push(@bug_objects, Bugzilla::Bug->check($id)); } } - @bug_objects = @{Bugzilla::Bug->new_from_list(\@ids)}; } # Make sure there are bugs to process. -- cgit v1.2.3-24-g4f1b