GivingThanks

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

isVerified function giving incorrect information

Summary

isVerified function inside CharityRegistry.sol doesnt work as expected

https://github.com/Cyfrin/2024-11-giving-thanks/blob/304812abfc16df934249ecd4cd8dea38568a625d/src/CharityRegistry.sol#L24

Vulnerability Details

Currentlyt the function will return True even if charity is not registered.

return registeredCharities[charity];

Impact

Incorrect information will be given to end user when they are using this function

Tools Used

Manual review

Recommendations

Change it to this line

return verifiedCharities[charity];
Updates

Lead Judging Commences

n0kto Lead Judge 12 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.