medium10 pts · first answer countscryptographysmart-contract-security
Unchecked ecrecover
What is the bug in this signature check?
address public signer; // never set, still address(0)
function claim(bytes32 hash, uint8 v, bytes32 r, bytes32 s) external {
require(ecrecover(hash, v, r, s) == signer, "bad sig");
_payOut(msg.sender);
}Discussion 0
Join free to post in the discussion.
Related questions
- Keys and addressesBlockchain Developer
- What links one block to the nextBlockchain Developer
- Private variables are public dataBlockchain Developer
- Verifying a contract on EtherscanBlockchain Developer
- Sharing a seed phraseBlockchain Developer
- Why use OpenZeppelinBlockchain Developer
- Properties of keccak256Blockchain Developer
- The Merkle root in a blockBlockchain Developer