GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Anyone can call registerCharity() and add multiple spam charities or entries.

Summary

At present, anyone can call registerCharity() and add a charity in the registeredCharities() mapping however, in this way multiple malicious entries can be added leading to spam.

Vulnerability Details

Impact

Tools Used

Recommendations

A possible solution would be to allow only admin to add new charities as:\

function registerCharity(address charity) public {
require(msg.sender == admin, "Only admin can add");
registeredCharities[charity] = true;
}

Updates

Lead Judging Commences

n0kto Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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