GivingThanks

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

Incorrect Registry Address

Summary

The incorrect address is being used to configure the registry.

Vulnerability Details

In GivingThanks.sol, on line 16 the registry is being configured. However, the incorrect addess is being used to configure the registry variable. Here msg.sender is being used instead of the correct address which is the _registry parameter.

Impact

This means that no one will be able to donate because all calls to donate() will revert due to the check on line 22 calling isVerified() on the incorrect address.

Tools Used

Manual Review

Recommendations

Update line 16 to read registry = CharityRegistry(_regisrty).

Updates

Lead Judging Commences

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