forked from LedgerHQ/app-eos
-
Couldn't load subscription status.
- Fork 0
Open
Description
Validate data for all known calls, check to make sure no extra data included.
Data Validation Todo List
Based on analysis of eos_stream.c, here are all known actions that need data validation:
Token Actions
- ✅ TOKEN_TRANSFER_ACTION (
transfer) - eosio.token and core.vaulta contracts- Already has validation via
isTransferDataValid()function - Used in lines 338, 417, 852-854
- Already has validation via
- ✅ VAULTA_SWAPTO_ACTION (
swapto) - core.vaulta contract- Processed by
processTokenTransfer()function - Used in lines 320, 401, 842-844
- Processed by
EOSIO System Actions (eosio and core.vaulta contracts)
- DELEGATEBW_ACTION (
delegatebw)- Processed by
processEosioDelegate()function - Used in lines 345, 423, 859
- Processed by
- UNDELEGATEBW_ACTION (
undelegatebw)- Processed by
processEosioUndelegate()function - Used in lines 348, 424, 862
- Processed by
- VOTEPRODUCER_ACTION (
voteproducer)- Processed by
processEosioVoteProducer()function - Used in lines 363, 429, 868
- Processed by
- BUYRAM_ACTION (
buyram)- Processed by
processEosioBuyRam()function - Used in lines 354, 426, 871
- Processed by
- BUYRAM_ACTIONBYTES (
buyrambytes)- Processed by
processEosioBuyRam()function - Used in lines 357, 427, 872
- Processed by
- SELLRAM_ACTION (
sellram)- Processed by
processEosioSellRam()function - Used in lines 360, 428, 875
- Processed by
- UPDATE_AUTH_ACTION (
updateauth)- Processed by
processEosioUpdateAuth()function - Used in lines 366, 430, 878
- Processed by
- DELETE_AUTH_ACTION (
deleteauth)- Processed by
processEosioDeleteAuth()function - Used in lines 369, 431, 881
- Processed by
- REFUND_ACTION (
refund)- Processed by
processEosioRefund()function - Used in lines 351, 425, 865
- Processed by
- LINK_AUTH_ACTION (
linkauth)- Processed by
processEosioLinkAuth()function - Used in lines 372, 432, 884
- Processed by
- UNLINK_AUTH_ACTION (
unlinkauth)- Processed by
processEosioUnlinkAuth()function - Used in lines 375, 433, 887
- Processed by
- NEW_ACCOUNT_ACTION (
newaccount)- Processed by
processEosioNewAccountAction()function - Used in lines 378, 434, 890
- Processed by
State-Neutral Actions
- ✅ NOOP_ACTION (
noop) - null.vaulta contract- Processed by
processNoOperation()function - Used in lines 330, 409, 847
- Processed by
- ✅ IDENTITY (
identity) - 0x00 contract- Processed by
processNoOperation()function - Used in lines 331, 410, 849
- Processed by
Implementation Notes
- Each action needs a corresponding data validation function similar to
isTransferDataValid() - Validation should check for exact expected data size and structure
- Actions are defined as constants in lines 38-55 of
eos_stream.c - Contract owners are defined in lines 31-35
- The
isKnownAction()function (lines 397-439) determines which actions are recognized - Data validation should prevent extra data from being included in action payloads
Progress
Completed: 1/16 actions (6.25%)
- ✅ TOKEN_TRANSFER_ACTION (transfer)
Remaining: 15/16 actions (93.75%)
Metadata
Metadata
Assignees
Labels
👍 lgtmLooks Good To MeLooks Good To Me