Bug 95168 - Fix reporter hack
git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1552 6955db30-a419-402b-8a0d-67ecbb4d7f56custis
parent
c0c79fa690
commit
8775bf272e
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
1
xml.cgi
1
xml.cgi
|
@ -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!
|
||||
|
|
Loading…
Reference in New Issue