GivingThanks

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

User can add the same charity to the registry more than once

Summary

Users can add address of charity with CharityRegistry::registerCharityfunction. Then, the charity can be verified by admin and donated.

Vulnerability Details

CharityRegistry::registerCharityshould have check if the charity was already register.

Impact

User can add the same charity to the registry more than once.

Tools Used

Manual review

Recommendations

Add bool require statement.

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

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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