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

Add Malformed Signatures #290

Merged
merged 3 commits into from
Feb 15, 2024
Merged

Add Malformed Signatures #290

merged 3 commits into from
Feb 15, 2024

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Feb 10, 2024

Description

This PR adds different malformed typed signatures.
Note, at the moment, clicking most of them results in breaking MetaMask

This uncovers the following bugs on Extension:

On Mobile, the wallet does not break on any of these cases, bc there's little support to validations overall, so they need to be revised entirely.

Screenshots

Screenshot from 2024-02-11 12-41-10

test-dapp-malformed-signatures.mp4
test-dapp-malformed-signatues-mobile.mp4

},
message: {
name: 'Hello, Bob!',
extraData: 'This data is not typed!',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is extra data not typed

*/
signEmptyDomain.onclick = async () => {
const msgParams = {
domain: {},
Copy link
Contributor Author

@seaona seaona Feb 10, 2024

Choose a reason for hiding this comment

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

this is the empty domain

{ name: 'verifyingContract', type: 'address' },
],
OrderComponents: [
{ name: 'consideration', type: 'ConsiderationItem[+' },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an invalid type definition

wallet: 'Hello, Bob!',
extraData: 'This data is not typed!',
},
primaryType: 'Non-Existent',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an invalid primary type

},
],
},
types: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

no primary type is defined

chainId: chainIdInt,
name: 'Seaport',
version: '1.5',
verifyingContract: 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an invalid value (expected address)

@seaona seaona merged commit 5f0221a into main Feb 15, 2024
5 checks passed
@seaona seaona deleted the malformed-signatures branch February 15, 2024 07:29
@seaona seaona mentioned this pull request Feb 15, 2024
@seaona seaona mentioned this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants