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

Improve EIP-712 type string parsing #302

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Improve EIP-712 type string parsing #302

merged 1 commit into from
Sep 22, 2021

Conversation

clehner
Copy link
Contributor

@clehner clehner commented Sep 20, 2021

A panic in the string parsing was possible, due to calling .next().unwrap() twice on an iterator that is not known to contain more than one element. Fix by returning an error if the second item in the iterator is none. The first item is expected to always succeed so is unchanged.

@clehner clehner marked this pull request as ready for review September 20, 2021 17:49
@wyc wyc self-requested a review September 21, 2021 20:49
Copy link
Contributor

@chunningham chunningham left a comment

Choose a reason for hiding this comment

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

good catch

* Test some EIP-712 type string parsing

* Catch unmatched bracket in EIP-712 type string
@clehner clehner force-pushed the fix/bracket-parsing branch from 9df6c8c to c666c74 Compare September 22, 2021 14:16
@clehner clehner merged commit c666c74 into main Sep 22, 2021
@clehner clehner deleted the fix/bracket-parsing branch September 22, 2021 14:17
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.

3 participants