The signature verification process is not complete
Summary
The signature verification process is not complete, if the order signer is a contract.
Vulnerability Detail
The contract is using the below code to check the validity of the signature, but the order can get signed from EOA or Contract account, and the below code only works for EOA.
Saeedalipoor01988
medium
The signature verification process is not complete
Summary
The signature verification process is not complete, if the order signer is a contract.
Vulnerability Detail
The contract is using the below code to check the validity of the signature, but the order can get signed from EOA or Contract account, and the below code only works for EOA.
order signer
is an EOA, then thesignature
must be a valid ECSDA signature from theorder signer
.order signer
is a contract, thensignature
must be checked according to EIP-1271.Impact
The signature verification process is not complete, if the order signer is a contract.
Code Snippet
https://github.com/sherlock-audit/2023-04-jojo/blob/490ea04e6ad6dc6a862b3407b193264b91c6a760/smart-contract-EVM/contracts/impl/JOJOExternal.sol#L139
Tool used
Manual Review
Recommendation
Add the below code to make the signature verification process truly