The password set by the owner can be read easily by anyone.
In PasswordStore contract, getPassword(...) is used to read the set password from the contract. There is also this check in the function that ensures that only owner can read the value from the private variable s_password:
But this way of storing password is completely useless. Blockchain is a public ledger. That means anyone can read the data stored in a contract anytime. So storing the password in a private variable hides it only from other contracts. But anyone can read this data by getting the slot number and then can convert it easily to required type.
Password set by the owner can be seen by anyone.
Manual Review
Don't store any sensitive info directly into the contract. If there is need then hash it before storing. But storing as a hash will make this getPassword(...) function useless as it will return the hashed password. And hashing is a one way operation. No one can undo this and get back the original value.
Private functions and state variables are only visible for the contract they are defined in and not in derived contracts. In this case private doesn't mean secret/confidential
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.