-
Notifications
You must be signed in to change notification settings - Fork 984
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
Reject typeddata request when wrong chainId inside typed data #20821
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clauxx
force-pushed
the
fix/typed-data-wrong-chain
branch
from
July 19, 2024 13:58
923e889
to
a74100c
Compare
Jenkins BuildsClick to see older builds (12)
|
shivekkhurana
approved these changes
Jul 22, 2024
@qoqobolo @pavloburykh Ready for QA testing |
71% of end-end tests have passed
Failed tests (1)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Expected to fail tests (1)Click to expandClass TestWalletOneDevice:
Passed tests (5)Click to expandClass TestWalletOneDevice:
Class TestWalletMultipleDevice:
Class TestCommunityOneDeviceMerged:
|
@clauxx could you take a look at the |
thanks! Pushed again |
Thanks @clauxx, the PR is ready for merge. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #20757
Summary
We should reject any request where the typed data includes the wrong chainId (to prevent replay attacks). As a measure of security, we are checking that the typed data has the correct chain-id and reject potentially malicious requests without showing them to the user. Instead, we just show a toast, informing them that the signing is intended for a different network.
Included in the PR:
:wallet-connect/send-response
no longer dismissed the modal, not it's done in:wallet-connect/finish-session-request
. This is done because sometimes we need to reject (with send-response) without having a modal open, which breaks navigation if we dismiss a modal that doesn't exist.Steps to test
eth_signTypedData_v4
status: ready