zeta-chain / protocol-contracts

Protocol contracts implementing the core logic of the protocol, deployed on ZetaChain and on connected chains
MIT License
71 stars 58 forks source link

Add limits for all user input data #374

Closed lumtis closed 1 month ago

lumtis commented 2 months ago

Add user can enter arbitrary inputs for bytes argument types they can provide extensive data.

This might ends in unexpected behaviors for some networks we connect to.

We should add limits for all arguments where the length is entered by the users.

-> message -> revertMessage

We could put a limit for the sum of all data provided

Example

require(message.length + revertMessage.length <512)