Skip to content

Commit

Permalink
Item14204: Failed to return parse errors
Browse files Browse the repository at this point in the history
Check for JSON version was masking errors detected by the json parser.
  • Loading branch information
gac410 committed Nov 1, 2016
1 parent 4b0fbfd commit 8d393a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions JsonRpcContrib/lib/Foswiki/Request/JSON.pm
Expand Up @@ -199,6 +199,8 @@ sub _establishJSON {

$this->initFromString($data);

return if ( $this->{_jsonerror} );

# some basic checks if this is a proper json-rpc 2.0 request

# must have a version tag
Expand Down
2 changes: 1 addition & 1 deletion JsonRpcContrib/test/unit/JsonRpcContrib/JsonrpcTests.pm
Expand Up @@ -225,7 +225,7 @@ sub test_redirectto_Anchor {
Foswiki::Contrib::JsonRpcContrib::registerMethod( __PACKAGE__, 'trial',
\&json_handler );

my $query = Unit::Request->new(
my $query = Unit::Request::JSON->new(
{
action => ['jsonrpc'],
redirectto => "$this->{test_web}/$this->{test_topic}#MyAnch",
Expand Down

0 comments on commit 8d393a3

Please sign in to comment.