The set_deadline function accepts any u64 value without validation, allowing past or unrealistic deadlines.
The vulnerable code is in the set_deadline function:
rust
No Validation: Accepts deadline < current_time or excessively large values.
Logic Disruption: Past deadlines cause immediate failure; huge deadlines delay resolution indefinitely.
User Experience: Poor campaign management.
Manual Review
Validate deadline:
rust
Add new error code:
rust
The creator has an incentive to pay attention to the deadline and provide correct data. If the `deadline` is set in the past, the campaign will be completed. If there are any funds the creator or the contributors (depending on the success of the campaign) can receive them. It is the creator's responsibility to set correct deadline, otherwise the creator can create a new campaign. There is no impact on the protocol from this missing check, so I consider this to be an informational issue.
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.