The setPassword function lets anyone set the password. This could lead to a loss of funds for the owner. It is a high-severity bug.
->The setPassword function does not have any access modifier implemented nor a check within the function whether the EOA or the contract that is calling this function is the owner.
This is a Password storage contract so if a malicious user changes the password then he/she can get access to all the privileges and control that the owner has which can lead to loss of funds, Denial of Service(DoS), etc.
VS code, Remix
It is recommended to add a required statement before making any state changes in the function that checks whether the caller is the owner or not.
-->
require(msg.sender==s_owner);
->An Access modifier can also be used.
Anyone can call `setPassword` and set a new password contrary to the intended purpose.
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.