From af6885db81d0c5e516be0531b9089c6174978685 Mon Sep 17 00:00:00 2001 From: Remco Bloemen Date: Wed, 21 Feb 2018 15:15:28 -0800 Subject: Make first value illegal --- .../current/protocol/Exchange/MixinSignatureValidator.sol | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'packages/contracts') 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) { -- cgit v1.2.3