The set_deadline
function updates the deadline
field but does not set the deadline_set
flag (misspelled as dealine_set
in the account struct) to true
. This allows the creator to call set_deadline
multiple times, bypassing the intended single-use constraint.
Unintended Deadline Changes: The creator can repeatedly modify the deadline, disrupting fund logic (e.g., extending deadlines indefinitely).
Code Confusion: The misspelled dealine_set
field causes readability issues and potential future bugs.
Fix the Typo: Rename the struct field to deadline_set
.
Update the Flag: Set deadline_set
to true
after assigning the deadline.
Corrected 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.