Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

setPassword function can be called by everyone

Summary

Password can be set not only by owner but actually by everyone.

Vulnerability Details

The function does not have proper access control in place. The code doesn't check if the transaction is actually called by msg.sender.

Impact

Everyone can set the password, thereby completely defying the purpose of this contract.

Tools Used

none

Recommendations

Implement proper access control, e.g. through an onlyOwner modifier or OpenZeppelin's Ownable implementation.

Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 2 years ago
inallhonesty Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-lacking-access-control

Anyone can call `setPassword` and set a new password contrary to the intended purpose.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.