The PasswordStore::setPassword
function should check to see if the caller of the function is also the owner of the contract.
An attacker can call setPassword and change the password.
Can change the password and impact the protocol's main functionality
Foundry
setPassword should use the same condition and revert method as the getPassword function.
``Diff
function setPassword(string memory newPassword) external {
if (msg.sender != s_owner) {
revert PasswordStore__NotOwner();
}
s_password = newPassword;
emit SetNetPassword();
}
Anyone can call `setPassword` and set a new password contrary to the intended purpose.
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.