The setPassword
method is not protected and every account/contract can call it to change the password.
On line 26 of the PasswordStore.sol
, we have a method, setPassword
, that is not very well protected. Any contract/account can call it to change the password
.
This can lead to all sorts of problems, from the transfer of ownership to the theft of tokens/balances.
Add a modifier
function onlyOwner
, which makes sure that the caller (msg.sender
) is the owner of the contract, to the setPassword
method.
Remove the from line 36-39 of the getPassword
method and add the same onlyOwner
modifier to it.
Anyone can call `setPassword` and set a new password contrary to the intended purpose.
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.