aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-02-15 07:15:52 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:16 +0800
commit6bb93b817085cd3d4d2828933801ab88789f3963 (patch)
treec5ee2c333342b15a825fe3c6de286a74b9cbc2a9
parentd0f32d186502f4c8d675f3cd0000852366e942da (diff)
downloaddexon-sol-tools-6bb93b817085cd3d4d2828933801ab88789f3963.tar
dexon-sol-tools-6bb93b817085cd3d4d2828933801ab88789f3963.tar.gz
dexon-sol-tools-6bb93b817085cd3d4d2828933801ab88789f3963.tar.bz2
dexon-sol-tools-6bb93b817085cd3d4d2828933801ab88789f3963.tar.lz
dexon-sol-tools-6bb93b817085cd3d4d2828933801ab88789f3963.tar.xz
dexon-sol-tools-6bb93b817085cd3d4d2828933801ab88789f3963.tar.zst
dexon-sol-tools-6bb93b817085cd3d4d2828933801ab88789f3963.zip
Revert after cascade
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol13
1 files changed, 7 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 959300753..8e5fbb22e 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol
@@ -68,13 +68,14 @@ contract MixinSignatureValidator is
);
isValid = signer == recovered;
return;
-
- // Anything else is illegal
- } else {
- revert();
-
}
- return false;
+
+ // Anything else is illegal (We do not return false because
+ // the signature may actually be valid, just not in a format
+ // that we currently support. In this case returning false
+ // may lead the caller to incorrectly believe that the
+ // signature was invalid.)
+ revert();
}
function get32(bytes b, uint256 index)