The PasswordStore::s_password
variable is storing the password value being set in the PasswordStore::setPassword
function without any kind of hashing. This allows any kind of user to read the slots of the smart contracts and read the variable value.
When a user set a new password, the value of this password is being set into the PasswordStore::s_password
variable which is being save in one of the slots of the storage. That means that any kind of user would have access to this value which is not good when it comes to sensitive information.
Access to the PasswordStore::s_password
variable when reading the storage slots.
Foundry
Change the variable type from string to bytes32 since we are hashing the password to a bytes32 type.
Add hash conversion into the PasswordStore::setPassword
function.
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.