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

fix: perform upper and lower bounds check on unbonding value before casting from uint64 to int64 #1444

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

jtieri
Copy link
Member

@jtieri jtieri commented Apr 12, 2024

Previously we were converting a string value to an uint64 which was then cast into an int64 when calling time.Duration. GitHub was throwing a code scanning security alert and this should rectify that issue.

…onverting to int64

Previously we were converting a string value to an uint64 which was then cast into an int64 when calling time.Duration. GitHub was throwing a code scanning security alert and this should rectify that issue.
@jtieri jtieri marked this pull request as ready for review April 12, 2024 03:47
@jtieri jtieri requested a review from agouin as a code owner April 12, 2024 03:47
@jtieri jtieri enabled auto-merge (squash) April 12, 2024 06:20
Copy link
Contributor

@vimystic vimystic left a comment

Choose a reason for hiding this comment

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

Curious , do people really submit unbonding times that exceeds the limits of uint64?
Ah just read the GH suggestion .

@jtieri jtieri merged commit 3c7eb23 into main Apr 12, 2024
22 checks passed
@jtieri jtieri deleted the justin/bounds-check branch April 12, 2024 06:24
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