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

Feedback re: CBOR parsing, ensure all bytes are parsed #384

Open
CedarMist opened this issue Sep 9, 2024 · 0 comments
Open

Feedback re: CBOR parsing, ensure all bytes are parsed #384

CedarMist opened this issue Sep 9, 2024 · 0 comments
Labels
bug contracts Pull requests that update sapphire-contracts solidity

Comments

@CedarMist
Copy link
Member

This was noted in an audit:

There are a few issues around CBOR parsing in Solidity:

  • If new keys are added in future to existing structures this could break contracts
    • A workaround for this, is passing in a 'schema version' argument, which returns different structures - e.g. request 'version 2' to return the struct with the new fields
  • Implement a skipping CBOR parser, which skips past unknown keys
@CedarMist CedarMist added contracts Pull requests that update sapphire-contracts solidity bug labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug contracts Pull requests that update sapphire-contracts solidity
Projects
None yet
Development

No branches or pull requests

1 participant