Lack of Access Control in SetPassword Function
The setPassword
function in the contract allows anyone to set new password, which is not an intended behaviour.
As comments on the given function explain that only owner should be able to call it. But there is no check implemented to restrict this to be used by owner only. As a result, anybody can set the new password.
This will pose a significant risk to loss of original password. As anybody can make changes to it.
Manual review
Implement a proper access control using an if block, as given below.
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.