everyone can set the password
In PasswordStore.sol dev says (comment on line 23) that setPassword(string memory) (line 26) is only available to owner, when in fact everyone can set it. Here is the test function:
We cannot store the password in here because everyone would be able to change it, so there is no guarantee that it will save our password. It leads to the protocol being pointless, because the main point is to save the password. But in that instance, we save password today, tomorrow it is replaced by someone else.
PatrickAlphaC Solidity Tutorial
Add if statement at the start of the function to check if the one who calls it is the owner. If not revert PasswordStore__NotOwner()
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.