The return function in CharityRegistry:isVerified was found incorrectly implemented. Instead of returning the verification status of a charity, it returns the registration status of a charity. This leads to misleading information to any user who calls this function to check if a charity is legitimate and if to donate to it.
CharityRegistry:isVerified has wrongly implemented its return function. Instead of returning the verification status, it returns the registration status of a charity
Proof of Concept:
Add the following test to test\GivingThanks.t.sol:
Run the test forge test --match-test test_audit_returnFunctionInIsVerifiedCharityRegistry
The test failed indicating that the verification status didn't reflect the expected status which it should return false as the charity had not been verified by the admin after its registration.
Wrong return verification status that misleads any users/donors who intend to donate to the charity thinking the charity organization eligibility/validity has been verified, damaging the credibility of the protocol to carry out its due diligence.
Manual review with test
Amend the return function to return the correct verification status
Rerun the test above forge test --match-test test_audit_returnFunctionInIsVerifiedCharityRegistry
The test passed indicating that the change recommended does rectify the error and reflect the correct verification status.
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.