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

proposal: x/exp/jsonrpc2: allow JSON-RPC2 response errors to be exploitable #56133

Open
maxatome opened this issue Oct 10, 2022 · 1 comment
Open
Labels
Milestone

Comments

@maxatome
Copy link

jsonrpc2.wireError type is not exported, but contains useful information.

As jsonrpc2.AsyncCall.Await() returns an error, when a JSON-RPC2 error is returned by the server side, it is not possible for the caller to guess it is really a server error and also to access data it contains.

The proposal is simply to rename jsonrpc2.wireError to jsonrpc2.Error as done in https://go-review.googlesource.com/c/exp/+/415615

This way the caller can do a type assertion to check it is a server error, and then access the already exported fields.

The backward compatibility is not broken as the previous jsonrpc2.wireError type was not exported.

@maxatome
Copy link
Author

maxatome commented Dec 8, 2022

Does someone have any news about this proposal, please?

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

No branches or pull requests

2 participants