Participant can still join event even after getting his amount refunded. There is no code to remove participant from event in refund function.
In `ChristmasDinner.sol:refund' function there is no logic to remove participant from event .
Poc:
Attacker can participate by depositing token.
Then he can call refund function and get his token back, but he will still be able to participate because 'participant[msg.sender]' 's value is still "true".
Following foundry test shows that
line "assertEq(cd.getParticipationStatus(user1), true)" asserts that participant can still participate.
There is direct loss of funds because attacker can join event at free of cost.
Manual review and foundry
Adding following code in refund function will cancel participant's joining of event by setting "participant[msg.sender]" to false.
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.