summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-14 01:05:02 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-14 01:05:02 +0200
commit9b37668c48ab7f57e046af7e31b34212f58df87f (patch)
tree25bcbf5b3f161528aaee3c99e68eee210a29018e /Bugzilla
parent5b82a3b7cedbc3d71bc512d26e426625c483dc12 (diff)
downloadbugzilla-9b37668c48ab7f57e046af7e31b34212f58df87f.tar.gz
bugzilla-9b37668c48ab7f57e046af7e31b34212f58df87f.tar.xz
Bug 577765: Allow XML-RPC to accept multiple positional parameters
r=ghendricks, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/WebService/Server/XMLRPC.pm14
-rw-r--r--Bugzilla/WebService/Util.pm8
2 files changed, 12 insertions, 10 deletions
diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm
index 6eb09dc22..18757c0ec 100644
--- a/Bugzilla/WebService/Server/XMLRPC.pm
+++ b/Bugzilla/WebService/Server/XMLRPC.pm
@@ -152,13 +152,15 @@ use Bugzilla::WebService::Util qw(taint_data);
sub paramsin {
my $self = shift;
- return $self->{bz_params_in} if $self->{bz_params_in};
- my $params = $self->SUPER::paramsin(@_);
- if ($self->{_bz_do_taint}) {
- taint_data($params);
+ if (!$self->{bz_params_in}) {
+ my @params = $self->SUPER::paramsin(@_);
+ if ($self->{_bz_do_taint}) {
+ taint_data(@params);
+ }
+ $self->{bz_params_in} = \@params;
}
- $self->{bz_params_in} = $params;
- return $self->{bz_params_in};
+ my $params = $self->{bz_params_in};
+ return wantarray ? @$params : $params->[0];
}
1;
diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm
index 8ff608c3a..41e4c1d26 100644
--- a/Bugzilla/WebService/Util.pm
+++ b/Bugzilla/WebService/Util.pm
@@ -52,13 +52,13 @@ sub filter ($$) {
}
sub taint_data {
- my $params = shift;
- return if !$params;
+ my @params = @_;
+ return if !@params;
# Though this is a private function, it hasn't changed since 2004 and
# should be safe to use, and prevents us from having to write it ourselves
# or require another module to do it.
- Test::Taint::_deeply_traverse(\&_delete_bad_keys, $params);
- Test::Taint::taint_deeply($params);
+ Test::Taint::_deeply_traverse(\&_delete_bad_keys, \@params);
+ Test::Taint::taint_deeply(\@params);
}
sub _delete_bad_keys {