Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Emitting an incorrect event name

Summary

The setPassword() emits an incorrect event name.

Vulnerability Details

The SetNetPassword event, which is an incorrect event name, will be emitted when a new password is set through the setPassword().

function setPassword(string memory newPassword) external {
s_password = newPassword;
@> emit SetNetPassword();
}

https://github.com/Cyfrin/2023-10-PasswordStore/blob/856ed94bfcf1031bf9d13514cb21b591d88ed323/src/PasswordStore.sol#L28

Impact

The setPassword() is an essential function. Emitting an incorrect event name leads to the incorrect logging of important events.

Tools Used

Manual Review

Recommendations

Rename the event to SetNewPassword.

Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 2 years ago
inallhonesty Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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