The GivingThanks contract incorrectly initializes the CharityRegistry in the constructor by using msg.sender instead of the provided _registry parameter, leading to complete platform dysfunction.
https://github.com/Cyfrin/2024-11-giving-thanks/blob/main/src/GivingThanks.sol#L15-L19
As we can see in the highlighted line, it's using msg.sender instead of _registry. Which will set incorrect registry leading to failing other txns that are dependent on actual registry instance.
Platform completely breaks as it uses wrong address for charity verification.
All donation attempts will fail
No charity can be verified correctly
Manual Review , Foundry
By using actual input rather hardcoding msg.sender will solve the issue.
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.