Skip to content

fix: remove requirement for EIP-55 address when parsing SIWE message#24204

Merged
digiwand merged 1 commit intofix-siwe-parser-resolution-to-allow-schema-in-urlfrom
ellul/siwe-patch
Apr 23, 2024
Merged

fix: remove requirement for EIP-55 address when parsing SIWE message#24204
digiwand merged 1 commit intofix-siwe-parser-resolution-to-allow-schema-in-urlfrom
ellul/siwe-patch

Conversation

@NEllusion
Copy link
Copy Markdown
Contributor

Base branch is #24138

Description

Upon testing the new @spruceid/siwe-parser changes, @digiwand noticed that message parsing would fail when using the MetaMask Test dApp. During this investigation, it was identified that the parsing failed due to the isEIP55Address check.

This is due to the fact that an EIP-55 address is case sensitive, but MetaMask lowercases the wallet address before returning it to an eth_accounts call. This means that when dApps attempt to request a SIWE message (using this lowecase address), the operation would fail to parse.

This change removes that check, and provides the consistent experience we have already been giving prior to the @spruceid/siwe-parser v2 upgrade.

Related issues

Adds to #24138

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@NEllusion NEllusion requested a review from a team as a code owner April 23, 2024 19:32
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Apr 23, 2024
@digiwand
Copy link
Copy Markdown
Contributor

lgtm! will merge into the base branch

@digiwand digiwand merged commit 7508cee into fix-siwe-parser-resolution-to-allow-schema-in-url Apr 23, 2024
@digiwand digiwand deleted the ellul/siwe-patch branch April 23, 2024 20:34
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants