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

Validate inputs to JSON RPC interface #1819

Closed
spalladino opened this issue Aug 25, 2023 · 1 comment
Closed

Validate inputs to JSON RPC interface #1819

spalladino opened this issue Aug 25, 2023 · 1 comment
Labels
A-security Area: Relates to security. Something is insecure.

Comments

@spalladino
Copy link
Collaborator

The JSON RPC server used for exposing an instance of the Aztec RPC Server over HTTP does not validate inputs. Any error in or incompatibility with the client will cause unexpected errors. We should enforce strict validations on the API level.

As an example, an improperly encoded PrivateKey object sent from the CLI resulted in Unknown complete address for address when creating an account, since the generation of the address based off the private key was broken (more details in this Slack thread).

@github-project-automation github-project-automation bot moved this to Todo in A3 Aug 25, 2023
spalladino added a commit that referenced this issue Aug 28, 2023
… name (#1820)

Prevents from accidentally passing an unregistered class in the
autogenerated JSON RPC client and server. Picks the converter to use for
serialisation based on constructor name if function equality match fails
(since constructor name match may fail in minimised browser bundles).

We were bit by this when the `PrivateKey` class was registered in the
client, but due to a duplicated module, the `PrivateKey` class
registered was not the same as the one passed as an argument. This
caused the object not to be properly serialised, which due to #1819 was
not picked up on the server side, and caused all sort of issues.

Fixes #1826

---------

Co-authored-by: spypsy <[email protected]>
@spalladino spalladino added the A-security Area: Relates to security. Something is insecure. label Jan 5, 2024
@spalladino
Copy link
Collaborator Author

Superseded by #9455

@spalladino spalladino closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Oct 28, 2024
@spalladino spalladino removed this from A3 Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-security Area: Relates to security. Something is insecure.
Projects
None yet
Development

No branches or pull requests

1 participant