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
Be careful about the usage of Map, it is not the same as a Mapping in Soroban, and has similar storage limitations to Vec. To implement a Mapping equivalent, define an appropriate dictionary structure with Enum.
If using Map, make sure that authorization is required to add new elements, since this structure has storage limitations that could lead to a Denial of Service.
Tasks
Add new detector. Follow the same pattern as dos-unexpected-revert-with-vector, but check for usage of Map instead of Vec.
Add vulnerable test case, using Map, for example, to count votes.
Add remediated test case solving the issue with a require auth.
Add remediated test case using a dictionary structure with `Enum.
Add detector documentation
The text was updated successfully, but these errors were encountered:
Problem Description
Be careful about the usage of
Map
, it is not the same as aMapping
in Soroban, and has similar storage limitations toVec
. To implement aMapping
equivalent, define an appropriate dictionary structure withEnum
.If using
Map
, make sure that authorization is required to add new elements, since this structure has storage limitations that could lead to a Denial of Service.Tasks
Map
instead ofVec
.Map
, for example, to count votes.The text was updated successfully, but these errors were encountered: