GivingThanks

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

No Revert on Re-registration in CharityRegistry::registerCharity() function

Summary

The lack of re-registration checks can lead to data integrity issues and potential exploitation, which can be mitigated by adding a simple check in the registration function.

Vulnerability Details

The registerCharity function allows any address to be registered as a charity without checks. Re-registration of an already registered charity address is possible, which can overwrite previous state without any warning or error.

Impact

Re-registration can lead to confusion or errors in tracking which charities are newly registered.

Tools Used

Manual Review

Recommendations

Implementation of check that charity already registered

function registerCharity(address charity) public {
require(!registeredCharities[charity], "Charity already registered");
registeredCharities[charity] = true;
}
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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