Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor signature message checks #35

Closed
dgrcode opened this issue Sep 20, 2021 · 1 comment
Closed

Refactor signature message checks #35

dgrcode opened this issue Sep 20, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@dgrcode
Copy link
Collaborator

dgrcode commented Sep 20, 2021

This check looks unnecessary, as that mismatch would make the signature verification fail. For that to work we should send the currentMessage as first argument in the ethers.utils.verifyMessage call. Sending only data from the client to verify seems like a bad idea to me.

I've tested locally that verification fails if message mismatch and we verify with currentMessage instead of req.body.message.

We can remove this check making the code easier to follow and maintain. I can create an issue to tackle this if you agree with me.

Originally posted by @dgrcode in #31 (comment)

@dgrcode dgrcode added the enhancement New feature or request label Sep 20, 2021
@dgrcode dgrcode self-assigned this Sep 22, 2021
@dgrcode
Copy link
Collaborator Author

dgrcode commented Sep 29, 2021

Fixed by #48

@dgrcode dgrcode closed this as completed Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant