The rustfund::set_deadline function contains a logic error where it checks if a deadline has already been set using the dealine_set flag, but fails to update this flag after setting a new deadline. This creates a discrepancy between the intended behavior (allowing a deadline to be set only once) and the actual implementation (allowing multiple deadline changes).
Fund creator calls rustfund::set_deadline to set a deadline for the first time
The function checks if fund.dealine_set is true (it's false by default)
The deadline is updated, but fund.dealine_set remains false
Fund creator can call rustfund::set_deadline again to change the deadline
This cycle can repeat indefinitely, allowing the creator to manipulate the deadline
This issue undermines the trust in the crowdfunding system, as fund creators can extend deadlines indefinitely to prevent refunds or shorten deadlines unexpectedly to prevent further contributions.
This approach eliminates the need for a separate flag altogether, simplifying the 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.