The purpose of the christmasDinner contract, as stated in the ReadMe.md file, is to address funding security for social events by requiring attendees to pay upon signup, ensuring the host can plan with a clear budget after the deadline. However, a malicious user could sign up for the event by depositing zero ether, effectively making no payment at all.
Malicious user sign-up without making payment.
Let's assume receive function used to sign-up via ether update the Participant statue correct
Then, add the below foundry test to the ChristmasDinner.t.sol file:
Expected Output:
To fix this issue, consider the below updated code:
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.