diff --git a/src/ERC6538Registry.sol b/src/ERC6538Registry.sol index 102c551..ca1d79b 100644 --- a/src/ERC6538Registry.sol +++ b/src/ERC6538Registry.sol @@ -101,11 +101,7 @@ contract ERC6538Registry { s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } - - // If the signature is valid and not malleable, `ecrecover` returns the signing address. - if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {} else { - recoveredAddress = ecrecover(dataHash, v, r, s); - } + recoveredAddress = ecrecover(dataHash, v, r, s); } if ( diff --git a/test/ERC6538Registry.t.sol b/test/ERC6538Registry.t.sol index a8663ab..a67566a 100644 --- a/test/ERC6538Registry.t.sol +++ b/test/ERC6538Registry.t.sol @@ -332,20 +332,6 @@ contract RegisterKeysOnBehalf is ERC6538RegistryTest { registry.registerKeysOnBehalf(registrant, schemeId, signature, stealthMetaAddress); } - function testFuzz_RevertIf_AManipulatedErc712SignatureIsUsedToRegister( - string memory registrantSeed, - uint256 schemeId, - bytes memory stealthMetaAddress - ) external { - (address registrant, uint256 registrantPrivateKey) = makeAddrAndKey(registrantSeed); - bytes memory signature = - _generateRegistrationSignature(registrantPrivateKey, schemeId, stealthMetaAddress, 0); - bytes memory manipulatedSignature = manipulateSignature(signature); - - vm.expectRevert(bytes("")); - registry.registerKeysOnBehalf(registrant, schemeId, manipulatedSignature, stealthMetaAddress); - } - function testFuzz_RevertIf_AManipulatedErc712SignatureIsUsedToRegisterADifferentStealthMetaAddress( string memory registrantSeed, uint256 schemeId,