Everyone can set a new password using the setPassword() function.
The function setPassword() has one parameter - the 'newPassword' parameter and it's used to update the stored password.
As seen in the business rules, only the owner should be able to set a new password, but a check for that is never seen in the code.
Everyone can set a new password
Manual review
Add a check, similar to the one in the getPassword() function. And since the logic for checking if the owner is calling the function, or not, is the same, it can be extracted in a custom modifier:
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.