The ChristmasDinner contract allows Ether deposits via the receive() function, even after the deadline has passed. However, the refund function enforces a beforeDeadline restriction, preventing users from retrieving their Ether deposits after the deadline. This results in Ether being permanently locked in the contract if sent after the deadline.
The receive() function does not enforce the beforeDeadline modifier, allowing users to send Ether to the contract even after the deadline has passed.
The refund function uses the beforeDeadline modifier, making it impossible for users to retrieve Ether deposited after the deadline.
Ether sent after the deadline becomes permanently locked in the contract, leading to financial loss for users.
Manual code review
create a dedicated function to refund Ether sent after the deadline:
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.