GivingThanks

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

Incorrect Mapping Reference in `isVerified` Function"

Summary

In CharityRegistry.sol, isVerified function returning the wrong mapping.

Vulnerability Details

The function isVerified returns wrong parameter registeredCharities, basically this is a logic error, while the function should return verified charity users but instead this is returning registered charity users.

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

Impact

  • Donations might be send to unverified users.

  • This can mislead about verification status.

  • Will impact trust & transparency.

Tools Used

Manual Review

Recommendations

Change the Code to this: So that it will return Correct Status of Verified Charitiess.

function isVerified(address charity) public view returns (bool) {
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.