Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

No validtion of the input of function `setPassword`

Summary

No validtion of the input of function setPassword

Vulnerability Details

There is no input validation when function setPassword is being called.

Impact

Anyone can call the function right now and set the password value into anything including empty string.
This can break the protocol.

Tools Used

Manual review

Recommendations

+ error PasswordStore__InvalidValue();
function setPassword(string memory newPassword) external {
+ if (newPassword == password || newPassword == '') revert PasswordStore__InvalidValue();
s_password = newPassword;
emit SetNetPassword();
}
Updates

Lead Judging Commences

inallhonesty Lead Judge
about 2 years ago
inallhonesty Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Admin Input/call validation

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.