Incorrect address returned from signedPrefixedMessageToKey
when invalid data passed in
#1989
Labels
bug
A bug in behaviour or functionality
Incorrect address returned from
signedPrefixedMessageToKey
when invalid data passed inSteps To Reproduce
There are two ways to get incorrect address returned from
signedPrefixedMessageToKey
Expected behavior
signedPrefixedMessageToKey
returns null if:Actual behavior
When invalid data passed to
signedPrefixedMessageToKey
I get random addresses returned that did not sign the message and are not on the wallet that signed the original message.Environment
4.10.3
openjdk 18.0.2
+ using Clojure version1.11.1
macOS 13.0.1
with M1 chipAdditional context
ecrecover
works in Solidity so it was unexpected behaviour to me but maybe it is intentional for some reason?signedPrefixedMessageToKey
is supposed to be returning random addresses using invalid datasignedPrefixedMessageToKey
assumes EIP-712 signatures so a valid ETH signature from the right address could be passed in but with the wrong format and web3j would return the wrong signer. So someone might think this function does work on non EIP-712 signatures and use incorrectly.v
value to 27/28 except that i checked my signed message and it uses 27/28 already. Also this should still work according to EIP-712 spec I'm pretty sure.ecrecover
that is returning false addressesThe text was updated successfully, but these errors were encountered: