No control over the contract, anyone can change the password
this error was found on line 26. The function was to place control over the contract so only the owner can set a new password but the function had to restriction or access control so anyone can call the function.
the function has no restriction or access contract, therefore anyone can acesss the function and change the password.
Foundry
We can use require to place restrictions on anyone who isnt the owner from being able to set a new password.
with this we place acesss over the function to the owner only.
require(msg.sender == s_owner, "You are not the owner");
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.