The secure password can be read by anyone.is stored unencrypted as a private storage variable and can be read by anyone.
The intended way of accessing the password is through the getPassword() function which has an onlyOwner check. The password is however stored unencrypted as a private storage variable which can be accessed by anyone by reading the storage slot directly bypassing the getPassword() function.
The password is stored unencrypted in storage slot 1:
To access the contracts storage slot, use the following command in Foundry
It can the be read as ascii by using the following foundry command cast to-ascii <hex-data>
foundry
If the password is going to be stored on chain it has the be encrypted.
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.