From c1ca86053ed276aa05eac8468cea61785629ac5e Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 30 Jun 2008 02:57:54 +0000 Subject: =?UTF-8?q?Bug=20440612=20=C3=A2=C2=80=C2=93=20Use=20Bugzilla::Bug?= =?UTF-8?q?->check=20everywhere=20instead=20of=20ValidateBugID=20Patch=20B?= =?UTF-8?q?y=20Max=20Kanat-Alexander=20=20r=3DLpSolit?= =?UTF-8?q?,=20a=3DLpSolit?= 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.1