Only the owner should see the password, but anyone can see it
Even tho the function getPassword() will reverted if the sender is not the owner and the password string is a private variable, there are ways to know it
Way 1: Anyone can go to etherscan of this contract address and see the input of the latest transaction that calling this function setPassword()
Way 2: Anyone can get the value of the slot the s_password occupy
Example using ethers: await provider.getStorageAt("*CONTRACT_ADDRESS*", 1)
Link: https://docs.ethers.org/v5/single-page/#/v5/api/providers/provider/-%23-Provider-getStorageAt
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.