The getPassword
function has an unnecessary check to verify if the caller is the owner. Since the function is marked as view and can be accessed by any address without restriction.
The getPassword
function contains a check to verify if the caller is the owner. However, this check is unnecessary as the function is marked as view. In Ethereum
, view
functions do not modify the state and are inherently accessible to any address
.
The
check does not provide any additional security in this context. It only adds unnecessary complexity to the code without offering any meaningful protection.
Manual Review
Remove the if (msg.sender != s_owner)
check from the getPassword
function.
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.