Anyone can read the private state variable s_password
.
s_password
is defined with a private visibility but this does not mean that the variable is private and that no one can access it. The variable is accessible through the contract storage.
This way, anyone can read the owner's password.
One solution is to encrypt the password off-chain and store the encrypted password on-chain.
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.