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

getPassword - Incorrect comment

Summary

The comment in the getPassword function is incorrect.

Vulnerability Details

The getPassword function has no parameters. However, the comments describe the newPassword parameter.

/*
* @notice This allows only the owner to retrieve the password.
* @param newPassword The new password to set.
*/
function getPassword() external view returns (string memory) {
if (msg.sender != s_owner) {
revert PasswordStore__NotOwner();
}
return s_password;
}

Impact

The comment provides incorrect information.

Tools Used

Manual Review

Recommendations

Delete the newPassword comment from the getPassword function.

/*
* @notice This allows only the owner to retrieve the password.
-* @param newPassword The new password to set.
*/
function getPassword() external view returns (string memory) {
if (msg.sender != s_owner) {
revert PasswordStore__NotOwner();
}
return s_password;
}
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.