Skip to content
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

JSON-RPC id field validation #441

Open
mattias-p opened this issue Jun 25, 2018 · 1 comment
Open

JSON-RPC id field validation #441

mattias-p opened this issue Jun 25, 2018 · 1 comment

Comments

@mattias-p
Copy link
Member

Regarding the id field, from the JSON-RPC specification:

An identifier established by the Client that MUST contain a String, Number, or NULL value if included.

Today arrays and objects are also accepted.

$ curl -s -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"version_info","id":[]}' http://localhost:5000/ && echo
{"id":[],"jsonrpc":"2.0","result":{"zonemaster_backend":"2.0.2","zonemaster_engine":"v2.0.6"}}

This was introduced in #432.

@pamasse
Copy link
Contributor

pamasse commented Dec 11, 2018

Today we only check if id exists.
We also need to check the type =>

Id
An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null [1] and Numbers SHOULD NOT contain fractional parts [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants