Absence of access control checks to validate whether the caller of setPassword
function possesses the appropriate ownership credentials.
The setPassword
function in the PasswordStore.sol
file does not have any checks to determine whether the user calling this function is owner or not.
The setPassword
function, as currently implemented, lacks the necessary safeguards to ascertain whether the caller is authorized as the owner or not.
An access control deficiency is observed, permitting the function's invocation by any user to call the setPassword
function and set a new password, a deviation from the desired behavior of restricting access solely to the owner.
The setPassword
function doesn't check if the user calling it is the rightful owner. This caused a test case to pass even when a user who wasn't an owner was calling it.
VS Code
Create a modifier or add checks to the setPassword
function such that only owner can access this function.
Instead of using this function
use this
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.