The registry
variable should be initialized with the _registry
parameter passed to the constructor, rather than msg.sender
.
Currently, the registry
variable is mistakenly initialized with msg.sender
, which can cause unintended functionality by linking to the deploying address instead of the intended CharityRegistry
address.
https://github.com/Cyfrin/2024-11-giving-thanks/blob/main/src/GivingThanks.sol#L15-L19
Misinitialization can prevent the contract from correctly referencing the designated CharityRegistry
instance, potentially disrupting the verification checks for charities and leading to improper access control.
Manual Review
Ensure registry
is initialized with _registry
to accurately set the intended CharityRegistry
contract:
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.