GivingThanks

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

Verification Failure in `GivingThanks::donate` function

Summary

The GivingThanks::donate function checks if a charity is verified by calling registry.isVerified(charity) as a requirement to make the donation. But due to an incorrect value assignment in registry, the contract will fail.

Vulnerability Details

Since the address of CharityRegistry contract has not been assigned to the variable registry in the constructor, this verification function will not be available causing the contract to fail.

Impact

The donate function will not be able to verify any charity and all donations will fail.

Tools Used

Foundry, Remix

Recommendations

Ensure that the value of registry is correctly assigned in the constructor with the address of the CharityRegistry contract.

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-bad-registry-set-at-construction

Likelyhood: High, the parameter is not well used and won't be set. Impact: Low, can be changed with the setter and no one will be able to donate to malicious charity.

Support

FAQs

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