You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment get_contract_storage uses scale::Decode::decode, which can succeed even if not all bytes are consumed. This would be an issue where corrupted or invalid bytes in a storage cell are successfully decoded, but the expectation is that this should fail.
We should investigate using decode_all instead which will fail if there are bytes remaining in the input after decoding successfully.
Note that this may technically be a "breaking" change if existing contracts are (ab)using this behaviour, so will require some communication if we go ahead with it.
The text was updated successfully, but these errors were encountered:
Raised by @DamianStraszak.
At the moment
get_contract_storage
usesscale::Decode::decode
, which can succeed even if not all bytes are consumed. This would be an issue where corrupted or invalid bytes in a storage cell are successfully decoded, but the expectation is that this should fail.We should investigate using
decode_all
instead which will fail if there are bytes remaining in the input after decoding successfully.Note that this may technically be a "breaking" change if existing contracts are (ab)using this behaviour, so will require some communication if we go ahead with it.
The text was updated successfully, but these errors were encountered: