From 7cf2170f20f745a5096cfb624bef7b6943851f74 Mon Sep 17 00:00:00 2001 From: Harshit sharma <79695575+HarshitSharma007@users.noreply.github.com> Date: Thu, 9 Feb 2023 23:48:18 +0530 Subject: [PATCH 1/3] Update SignatureChecker.sol Used >=32 instead of ==32 in SignatureChecker for return data length check --- contracts/utils/cryptography/SignatureChecker.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/utils/cryptography/SignatureChecker.sol b/contracts/utils/cryptography/SignatureChecker.sol index e06778debd7..f165c5df165 100644 --- a/contracts/utils/cryptography/SignatureChecker.sol +++ b/contracts/utils/cryptography/SignatureChecker.sol @@ -31,7 +31,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)); } } From c6d2e156215c7cad7a5176fa3025cfa43e5cc61e Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Fri, 24 Feb 2023 11:39:30 -0300 Subject: [PATCH 2/3] add changeset --- .changeset/warm-masks-obey.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/warm-masks-obey.md diff --git a/.changeset/warm-masks-obey.md b/.changeset/warm-masks-obey.md new file mode 100644 index 00000000000..babba88a592 --- /dev/null +++ b/.changeset/warm-masks-obey.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +Allow return data length >= 32 in SignatureChecker From 13ec8e9ce3bcbcd2d2fcec8c7cdf5069ff2e260d Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Fri, 24 Feb 2023 11:46:20 -0300 Subject: [PATCH 3/3] fix changeset format --- .changeset/warm-masks-obey.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/warm-masks-obey.md b/.changeset/warm-masks-obey.md index babba88a592..3bcfa9bdd84 100644 --- a/.changeset/warm-masks-obey.md +++ b/.changeset/warm-masks-obey.md @@ -2,4 +2,4 @@ 'openzeppelin-solidity': minor --- -Allow return data length >= 32 in SignatureChecker +`SignatureChecker`: Allow return data length greater than 32 from EIP-1271 signers.