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.
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.
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.
The audit was performed using manual review.
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.