Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Conversation

@legobeat
Copy link
Contributor

@legobeat legobeat commented Sep 1, 2023

signMessage is supposed to be rejecting malformed input but relies on implicit behavior in dependencies to do so. This makes it brittle and it can be seen failing here: https://github.com/MetaMask/eth-simple-keyring/actions/runs/6053985322/job/16430596839

This adds validation that the string has a length and is a hexadecimal string with optional 0x-prefix. It makes it optional via the new validateMessage option (default: true)

Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

type-bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants