diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-02-22 07:15:28 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:16 +0800 |
commit | af6885db81d0c5e516be0531b9089c6174978685 (patch) | |
tree | ead8e7d2de9d6dd316f917051ba1477f82c6f33a /packages/contracts | |
parent | 78e216d1570a2f4b41715b0602e4606659a2f512 (diff) | |
download | dexon-sol-tools-af6885db81d0c5e516be0531b9089c6174978685.tar dexon-sol-tools-af6885db81d0c5e516be0531b9089c6174978685.tar.gz dexon-sol-tools-af6885db81d0c5e516be0531b9089c6174978685.tar.bz2 dexon-sol-tools-af6885db81d0c5e516be0531b9089c6174978685.tar.lz dexon-sol-tools-af6885db81d0c5e516be0531b9089c6174978685.tar.xz dexon-sol-tools-af6885db81d0c5e516be0531b9089c6174978685.tar.zst dexon-sol-tools-af6885db81d0c5e516be0531b9089c6174978685.zip |
Make first value illegal
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol index e243eade1..1e072f001 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol @@ -26,7 +26,7 @@ contract MixinSignatureValidator is MSignatureValidator { enum SignatureType { - Invalid, + Illegal, // Default value Caller, Ecrecover, EIP712, @@ -50,11 +50,9 @@ contract MixinSignatureValidator is bytes32 r; bytes32 s; - // Zero is always an invalid signature - if (signatureType == SignatureType.Invalid) { - require(signature.length == 1); - isValid = false; - return; + // Always illegal signature + if (signatureType == SignatureType.Illegal) { + revert(); // Implicitly signed by caller } else if (signatureType == SignatureType.Caller) { |