The GivingThanks contract has field CharityRegistry public registry; . In the constructor function it's value is set to the address of the deployer of the contract which is wrong :
registry = CharityRegistry(msg.sender);
The GivingThanks contract will use the msg.sender address as a registry which is unexpected and wrong. Furthermore , the constructor accepts a parameter for registry address _registry which is not used and causes even more confusion. Since the deployer of the contract will not be a registry the contracts functionality that works with registry will not work.
Add the following test to GivingThanks.t.sol:
Execute it by running forge test --mt testRegistryMalfunction in a shell.
Apply the following diff to use in the input parameter that is passed in the constructor and set the registry field.
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.