Allow return data length >= 32 in SignatureChecker (#4038)

Co-authored-by: Francisco Giordano <fg@frang.io>
This commit is contained in:
Harshit sharma
2023-02-24 20:35:46 +05:30
committed by GitHub
parent d5581531de
commit b4d765b130
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---
`SignatureChecker`: Allow return data length greater than 32 from EIP-1271 signers.

View File

@ -44,7 +44,7 @@ library SignatureChecker {
abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)
); );
return (success && return (success &&
result.length == 32 && result.length >= 32 &&
abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));
} }
} }