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

No event emitted upon password change

Summary:

No event emitted upon password change

Vulnerability Details:

The setPassword() function does not emit any event when the password is changed.

Impact:

This makes it difficult to track changes to the password.

Tools Used:

Replit IDE, Foundry, Remix, PhindAI

Recommendations:

// event correctly specified
event SetPassword(address indexed _by, string _password);
// event properly implemented in `setPassword function
function setPassword(string memory newPassword) external {
require(msg.sender == s_owner, "This function can only be called by the owner");
s_password = newPassword;
emit SetPassword(msg.sender, newPassword);
}
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.