Upon deployment of the contract, there is an assumption that only the owner s_owner can set and retrieve a password. But the missing access control check in: https://github.com/Cyfrin/2023-10-PasswordStore/blob/856ed94bfcf1031bf9d13514cb21b591d88ed323/src/PasswordStore.sol#L26 means anyone can call setPassword and update the password which is not expected by the owner.
In setPassword, there is no check if the caller of the method is actually the owner's address stored in s_owner during deployment. This results in the s_password storage variable being updated by anyone.
Anyone can update the password at any time. all access pass.
Add test_non_owner_can_update_password() below to passwordStore.t.sol
Manual review.
Add a check for the caller of the setPassword() function:
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.