setPassword()
function has zero access control, anyone can call this function and set/change the password for the user.
Total lack of access control in any form whatsoever in this function, which would allow anyone to change the user's password at any time.
n/a
If anyone other than the owner changes this password, the owner would have lost access to his/her current (correct) password permanently and hence lost access to any accounts which they used this password for, completely obliterating the idea/intention behind the contract, to safekeep the owner's (current) password.
VSC
Add a function modifier or a require()
or if/revert
check inside the function, as per below:
OR
Create a new modifier in the contract for access control:
OR
And then add the modifier to this function:
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.