-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unreachable OpenRPC rpc.discover method #119
Comments
Workaround (overriding import jsonrpc.jsonrpc2
jsonrpc.jsonrpc2.JSONRPC20Request.method = None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
json-rpc completely prevents the usage of
rpc.
method namespace, aimed at system extensions, preventing any user or library from implementing said extensions.json-rpc/jsonrpc/jsonrpc2.py
Lines 74 to 79 in 00b24a9
Nowhere in the JSON-RPC specification it is said that the usage of
rpc.
methods must be unconditionally forbidden, the restriction is reserved for system extensions, and MUST NOT be used for anything else, so its usage for system extensions is explicitly stated.Blocking that namespace for system extensions is an explicit violation of the specification, and that fact impacts OpenRPC, which makes uses that namespace for its
rpc.discover
method (spec specification) (albeit OpenRPCrpc.discover
being really a system extension or not is debatable, just like what asystem extension
itself really means).Steps to Reproduce
rpc.discover
on a test applicationtestrpc.py
(andpip install werkzeug jsonrpc
).curl localhost:8000 -d '{"jsonrpc":"2.0","method":"rpc.discover","id":0,"params":{}}'
Expected behavior:
Actual behavior:
Reproduces how often: happens every time.
Versions
All python versions,
json-rpc-1.13.0
.The text was updated successfully, but these errors were encountered: