Skip to content

Commit

Permalink
Allow return data length >= 32 in SignatureChecker (#4038)
Browse files Browse the repository at this point in the history
Co-authored-by: Francisco Giordano <fg@frang.io>
  • Loading branch information
HarshitSharma007 and frangio authored Feb 24, 2023
1 parent d558153 commit b4d765b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/warm-masks-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openzeppelin-solidity': minor
---

`SignatureChecker`: Allow return data length greater than 32 from EIP-1271 signers.
2 changes: 1 addition & 1 deletion contracts/utils/cryptography/SignatureChecker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ library SignatureChecker {
abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)
);
return (success &&
result.length == 32 &&
result.length >= 32 &&
abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));
}
}

0 comments on commit b4d765b

Please sign in to comment.