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

the comment describing the getPassword function are incorrect

Summary

The comment describing the PasswordStore::getPassword function is incorrect, it indicates sending a parameter that is not used by the function

Vulnerability Details

The comment indicates a parameter newPassword to pass to the function, but the PasswordStore::getPassword function has no parameters.
The comment was probably copied from the PasswordStore::setPassword function and the line indicating the parameter to pass to the function was not removed.

/*
* @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 impact is minimal because it does not block the functioning of the smart contract.

Tools Used

  • Manual check

Recommendations

Update the comment removing the @param row.

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.