Bug 95168 - Fix reporter hack

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1552 6955db30-a419-402b-8a0d-67ecbb4d7f56
custis
vfilippov 2012-05-18 12:04:15 +00:00
parent c0c79fa690
commit 8775bf272e
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ package Bugzilla::SmMapping;
use utf8;
use strict;
use base qw(Exporter);
use Bugzilla::Util;
use Bugzilla::Error;
use Bugzilla::Search;
@ -51,6 +52,7 @@ sub get_wbs_mapping
{
ThrowUserError('tnerp_mapping_id_invalid');
}
$tnerp_id ? trick_taint($tnerp_id) : trick_taint($our_id);
my ($set, $other) = $tnerp_id ? ('tnerp_id', 'our_id') : ('our_id', 'tnerp_id');
my ($r) = Bugzilla->dbh->selectrow_array(
"SELECT $other FROM tnerp_wbs_mapping WHERE $set=?",
@ -67,6 +69,7 @@ sub set_wbs_mapping
{
ThrowUserError('tnerp_mapping_id_invalid');
}
trick_taint($_) for $our_id, $tnerp_id;
Bugzilla->dbh->do(
"INSERT INTO tnerp_wbs_mapping (our_id, tnerp_id) VALUES (?, ?)",
undef, $our_id, $tnerp_id
@ -77,6 +80,7 @@ sub set_wbs_mapping
sub delete_wbs_mapping
{
my ($tnerp_id) = @_;
trick_taint($tnerp_id);
Bugzilla->dbh->do("DELETE FROM tnerp_wbs_mapping WHERE tnerp_id=?", undef, $tnerp_id);
}

View File

@ -99,7 +99,6 @@ else
{
my $func_args = { %$args };
delete $func_args->{method};
trick_taint($func_args->{$_}) for keys %$func_args;
my $pkg = 'Bugzilla::WebService::'.$service.'::XMLSimple';
$Bugzilla::Error::IN_EVAL++;
# FIXME exported methods need prefix or other protection type!