Commit 437b14a0 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 529223: The JSON-RPC interface was not working at all with JSON-RPC 1.0,…

Bug 529223: The JSON-RPC interface was not working at all with JSON-RPC 1.0, because it was mis-handling input parameters. Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
parent 62d123f6
......@@ -114,8 +114,10 @@ sub _argument_type_check {
# JSON-RPC 1.0 requires all parameters to be passed as an array, so
# we just pull out the first item and assume it's an object.
my $params_is_array;
if (ref $params eq 'ARRAY') {
$params = $params->[0];
$params_is_array = 1;
}
taint_data($params);
......@@ -151,6 +153,10 @@ sub _argument_type_check {
eval "package $new_class;$isa_string;";
bless $self, $new_class;
if ($params_is_array) {
$params = [$params];
}
return $params;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment