GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

CharityRegistry.isVerified(address): returns wrong address

Summary

The function CharityRegistry.isVerified(address) returns a registered charity.

Vulnerability Details

The function CharityRegistry.isVerified(address) returns the registered charity. No information is given as to whether the charity has been verified.

Impact

The 'CharityRegistry.isVerified(address)' function is used to check whether a charity is eligible to receive donations. Instead of returning a verified charity, this function only returns a registered charity, which anyone can do. This may result in unverified charities receiving donations from participants who are unaware of the error.

Tools Used

Manual review

Recommendations

Correct the CharityRegistry.isVerified(address) as follows:

function isVerified(address charity) public view returns (bool) {
- return registeredCharities[charity];
+ return verifiedCharities[charity];
}
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-isVerified-return-registered-charities

Likelyhood: High, the function returns registered charities instead of verified ones. Impact: High, Any charities can be registered by anyone and will be declared as verified by this function bypassing verification.

Support

FAQs

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