In the ChristmasDinner::setDeadline
function a malicious host can reduce the deadline arbitrarily to lock out participants from refunding their deposits.
In the ChristmasDinner::setDeadline
function, a malicious host can reduce the deadline arbitrarily to lock out participants from refunding their deposits. Since there is no data validation for the _days
argument, the host can first set a proper deadline of 7 days. Then participants can deposit funds before the deadline passes. On the third day, for example, the host changes the deadline to days = 0, so now the fundraising ends, and participants will not be able to claim a refund if they decide to not be a part of the fundraising anymore.
Add the following test suit in the ChristmasDinnerTest.t.sol.
Participants lose their deposits without recourse.
Participants lose their trust in the protocol.
Manual review
Foundry
Modify the setDeadline
function to allow updates only if the new deadline is greater than the existing deadline and add an appropriate error.
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.