diff options
author | mkanat%bugzilla.org <> | 2008-06-30 02:57:54 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-06-30 02:57:54 +0000 |
commit | c1ca86053ed276aa05eac8468cea61785629ac5e (patch) | |
tree | 836d5cae869dc47008b16bccb1de47320a36fcc8 /process_bug.cgi | |
parent | Bug 421064: [Oracle] whine.pl crashes and doesn't work (diff) | |
download | bugzilla-c1ca86053ed276aa05eac8468cea61785629ac5e.tar.gz bugzilla-c1ca86053ed276aa05eac8468cea61785629ac5e.tar.bz2 bugzilla-c1ca86053ed276aa05eac8468cea61785629ac5e.zip |
Bug 440612 â Use Bugzilla::Bug->check everywhere instead of ValidateBugID
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 15 |
1 files changed, 4 insertions, 11 deletions
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. |