Skip to content

Add Malformed Signatures - #290

Merged
seaona merged 3 commits into
mainfrom
malformed-signatures
Feb 15, 2024
Merged

Add Malformed Signatures#290
seaona merged 3 commits into
mainfrom
malformed-signatures

Conversation

@seaona

@seaona seaona commented Feb 10, 2024

Copy link
Copy Markdown
Member

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

Comment thread src/index.js
},
message: {
name: 'Hello, Bob!',
extraData: 'This data is not typed!',

Copy link
Copy Markdown
Member 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

Comment thread src/index.js
*/
signEmptyDomain.onclick = async () => {
const msgParams = {
domain: {},

@seaona seaona Feb 10, 2024

Copy link
Copy Markdown
Member Author

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

Comment thread src/index.js
{ name: 'verifyingContract', type: 'address' },
],
OrderComponents: [
{ name: 'consideration', type: 'ConsiderationItem[+' },

Copy link
Copy Markdown
Member 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

Comment thread src/index.js
wallet: 'Hello, Bob!',
extraData: 'This data is not typed!',
},
primaryType: 'Non-Existent',

Copy link
Copy Markdown
Member 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

Comment thread src/index.js
},
],
},
types: {

Copy link
Copy Markdown
Member 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

Comment thread src/index.js
chainId: chainIdInt,
name: 'Seaport',
version: '1.5',
verifyingContract: 1,

Copy link
Copy Markdown
Member 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
@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