Skip to content

eth: reject malformed typed data safely - #172

Merged
Tomasvrba merged 1 commit into
BitBoxSwiss:masterfrom
Tomasvrba:typed-data-fix
Aug 19, 2026
Merged

eth: reject malformed typed data safely#172
Tomasvrba merged 1 commit into
BitBoxSwiss:masterfrom
Tomasvrba:typed-data-fix

Conversation

@Tomasvrba

Copy link
Copy Markdown
Collaborator

Decode EIP-712 payloads into typed structures and return errors for malformed JSON structures, value paths, and scalar types instead of panicking during firmware requests.

Tightens validation in the API in preparation for Wallet Connect upgrades

@Tomasvrba
Tomasvrba requested a review from benma July 22, 2026 20:46
@Tomasvrba
Tomasvrba force-pushed the typed-data-fix branch 2 times, most recently from 7817efe to f3f0816 Compare July 23, 2026 04:52

@benma benma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should disable goconst in all our repos, that linter annoy more than it helps 😅

@Tomasvrba

Copy link
Copy Markdown
Collaborator Author

Should disable goconst in all our repos, that linter annoy more than it helps 😅

Yeah, I think the fix is worse than the actual issue 👎 :D

Decode EIP-712 payloads into typed structures and return errors
for malformed JSON structures, value paths, and scalar types instead
of panicking during firmware requests.

eth: validate typed data string fields

Reject missing or null primaryType and member names before sending a
malformed request to the firmware.

eth: preserve exact typed data keys

Use checked map lookups so differently cased fields cannot replace fields used for signing.
@Tomasvrba
Tomasvrba merged commit 005a2fb into BitBoxSwiss:master Aug 19, 2026
3 checks passed
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