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

Get password function should not revert

Summary

This issue uncovered a low-risk issue related to the getPassword function, which has an access control check for the owner. However, it is recommended that getter functions should not revert.

Vulnerabilities Details

The vulnerability identified in the audit is related to the getPassword function. Although it has an access control check for the owner, it is considered a best practice for getter functions to not revert. Reverting the function can disrupt the normal operation of the contract and may cause inconvenience to users.

Impact

The impact of this vulnerability is relatively low. While it may not directly compromise the security of the contract, it can introduce usability issues and affect the overall user experience. Reverting the function unnecessarily can create confusion and hinder the smooth functioning of the contract.

Tool Used

The audit was performed using manual review.

Recommendations

To address this issue, it is recommended to modify the getPassword function to remove the access control check that causes the function to revert. Instead, consider implementing a different approach that allows users to query the password without disrupting the contract's operation. This can be achieved by returning a default value or an empty string when an unauthorized caller attempts to access the function.

Additionally, it is advisable to thoroughly test the modified code to ensure that the changes do not introduce any unintended side effects or security vulnerabilities.

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.