-
Notifications
You must be signed in to change notification settings - Fork 108
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
LOW-3: Missing input validation #1025
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1025 +/- ##
==========================================
+ Coverage 81.06% 81.08% +0.01%
==========================================
Files 52 52
Lines 2150 2152 +2
Branches 67 68 +1
==========================================
+ Hits 1743 1745 +2
Misses 392 392
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e37aa1e
to
db994ef
Compare
contracts/src/BeefyClient.sol
Outdated
@@ -215,6 +216,9 @@ contract BeefyClient { | |||
ValidatorSet memory _initialValidatorSet, | |||
ValidatorSet memory _nextValidatorSet | |||
) { | |||
if (_nextValidatorSet.id != _initialValidatorSet.id + 1) { | |||
revert InvalidValidatorSetData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can just revert()
here without raising a custom exception. I don't want to add a custom exception InvalidValidatorSetData
which may never ever be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 9fd1195.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, would prefer a string that looks more robotic: invalid-constructor-params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick fix: 87d87cc.
87d87cc
to
cd3e57c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Resolves: SNO-753
Extra merkle proof validations from the audit issue are not addressed.