Commit 1a4e5346 by Francisco Giordano Committed by Nicolás Venturo

Add SignatureBouncer test for when msg.data is too short (#1360)

* add test for msg.data too short

* fix test to hit that branch

* Update SignatureBouncer.test.js
parent 536262f2
...@@ -63,4 +63,11 @@ contract SignatureBouncerMock is SignatureBouncer, SignerRoleMock { ...@@ -63,4 +63,11 @@ contract SignatureBouncerMock is SignatureBouncer, SignerRoleMock {
{ {
} }
function tooShortMsgData()
public
onlyValidSignatureAndData("")
view
{
}
} }
...@@ -128,6 +128,12 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz ...@@ -128,6 +128,12 @@ contract('SignatureBouncer', function ([_, signer, otherSigner, anyone, authoriz
) )
); );
}); });
it('does not allow msg.data shorter than SIGNATURE_SIZE', async function () {
await assertRevert(
this.sigBouncer.tooShortMsgData({ from: authorizedUser })
);
});
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment