In the constructor GivingThanks contract, parameter _registry is not used in the body of the constructor and msg.sender is used instead.
The constructor of GivingThanks uses msg.sender instead of _registry to set the registry address, which likely results in an invalid reference to CharityRegistry.
Using CharityRegistry(msg.sender) this way can lead to unintended behavior if msg.sender is not actually a CharityRegistry contract address.
Any function calls to registry (e.g., registry.isVerified(charity)) will fail if msg.sender is not a deployed instance of CharityRegistry
high as This prevents GivingThanks from interacting with the intended CharityRegistry instance, breaking the charity verification functionality in the donate function.
hight as This will happen in the constructor of GivingThanks
Foundry, Slither, Aderyn
Change the CharityRegistry(msg.sender) to use the input parameter instead of msg.sender
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.
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.