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

QA/LOW: Misleading comment at L24

Summary

At the moment the setPassword() function allows to set the same password over and over, no require() checks to prevent this, so user wont know that they're setting the previous password as the new one.

@param newPassword The new password to set.

Vulnerability Details

n/a

Impact

n/a

Tools Used

VSC

Recommendations

function setPassword(string memory newPassword) external {
++ require(newPassword != s_password, "New password same as old password!");
s_password = newPassword;
require(newPassword == s_password, "Failed to set password"); /// @audit this line is optional
emit SetNetPassword();
}
Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 2 years ago
inallhonesty Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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