The "function setPassword()" can be used or called by any address to set a new password.
This is a security vulnerability because we want only the owner to be able to change the password.
Here is the test code from hardhat to show that it can be easily compromised.
Stored" passwords" can be compromised very easily, it is very high vulnerability.
Hardhat + EthersJS
We should add access control to this function, to make sure that only the "owner" is able to call this function and set or change the "password". We can do this either by adding a modifier or just by checking with "if" condition that only "owner" should be able to change the password.
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.