Due to a lack of modifier, every person is able to change s_password
, resulting in overriding the password set in s_password
.
PasswordStore.sol
acts as Password Manager, where a user should be able to safely store his password. A user could set this password using the setPassword
function, which updates the s_password
variable:
However, this function lacks access control. Concretely, every person is able to call this function, resulting in changing the s_password
variable.
I wrote this PoC to showcase this, put it into PasswordStore.sol
:
The lack of access control breaks the core functionality of the project, which is being a Password Manager.
Manual review
Add the following check in the setPassword
function:
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.