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

01-The `setPassword` function doesn't do access control checking for `owner`

Summary & Vulnerability Details

The NatSpec in the setPassword function tells that the function is controlled by the owner, but there is no owner access check done in that function.

Impact

Because this function can be invoked by anyone, it can lead to other users overstepping their authority to set passwords.

Tools Used

Manual Review

Recommendations

  1. prefix the s_password = newPassword; code with the following conditional judgment: if (msg.sender ! = s_owner) { revert PasswordStore__NotOwner(); }

  2. You can control the invocation of this function by setting the modifier.

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.