diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-02-24 07:13:18 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:16 +0800 |
commit | 1e07fcacacd760ce3dee1e70597ef2ffd2847daa (patch) | |
tree | a1e9ca32a5e121096996d14e6fdb4286de681b94 /packages | |
parent | 69ab913bc6e155042af5fb2b2f0b740cd1d2399c (diff) | |
download | dexon-0x-contracts-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.tar.gz dexon-0x-contracts-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.tar.zst dexon-0x-contracts-1e07fcacacd760ce3dee1e70597ef2ffd2847daa.zip |
Verify length on EIP712 signatures
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol index 91e788763..2d04c7c6d 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol @@ -96,9 +96,10 @@ contract MixinSignatureValidator is ); isValid = signer == recovered; return isValid; - + // Signature using EIP712 } else if (signatureType == SignatureType.EIP712) { + require(signature.length == 66); v = uint8(signature[1]); r = get32(signature, 2); s = get32(signature, 34); |