The 'PasswordStore::setPassword' function can be ran by anyone and not just the owner. Because there is no owner check or onlyOwner modifier used in the function, anyone can set the password. A check needs to be added to make sure only the owner can run the function.
Because there is no owner check or onlyOwner modifier used in the 'PasswordStore::setPassword' function, anyone can set the password. An owner check similar to the one used in the 'PasswordStore::getPassword' function should be used to prevent anyone other than the owner from setting the password.
This test passes as true. When there is a non-owner address that calls the setPassword() function there are no checks to stop this from happening. Only the owner should be able to call this function.
[PASS] test_non_owner_can_set_password() (gas: 22838)
-Foundry
Include a check to make sure the address calling the setPassword function is the owner and revert if it is not.
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.