Skip to content

JSON-RPC payloads don't need urldecode step #449

@cl0ne

Description

@cl0ne

For 14 years due to problems with some JS library (5749449) JSON-RPC request handler expects payload to be URL encoded.

JSON-RPC specification doesn't even mention the need for percent-encoding at all (same goes for older spec). None of the popular JSON-RPC clients (at least, this applies to Perl, C#, Java, Python implementations) apply URL encoding to the produced JSON request. Consequently, any method parameter that contains percent symbol will be either decoded to a wrong value, or will more often cause request handling failure.

The example from "AJAX through JSON-RPC" documentation page is broken due to this issue as well. Just include percent symbol in any of the submitted arguments, and you'll get either response code 500 (when the resulting character sequence is not valid, e.g. hello%world), or received request with different argument values (e.g., hello%20world becomes hello world).

This can hardly be expected as a correct behaviour for JSON-RPC server, even though correcting it is a backwards-incompatible change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions