The isVerified function in the CharityRegistry contract contains a critical bug where it incorrectly returns the value from registeredCharities rather than verifiedCharities. This means that any charity that has been registered, regardless of whether it has been verified, will appear as verified in the system.
The isVerified function currently returns registeredCharities[charity], which checks only if a charity is registered. The function should instead check verifiedCharities[charity] to determine if the charity has been verified.
Any address that is registered as a charity will appear as verified, even if it has not been verified by the admin. This could lead to unauthorized or unverified charities gaining access to features or interactions intended only for verified charities.
manual reviews
Modify the isVerified function to check verifiedCharities instead of registeredCharities.
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.