A potential issue arises when the setDeadline function is called with _days = 0, which sets the deadline to the current timestamp, effectively locking it forever. This could prevent any participants from signing up or interacting with the contract after the deadline is set, as the contract would consider the deadline already passed.
The function setDeadline(uint256 _days) does not currently check for the case when _days = 0. If _days is set to 0, the deadline will be set to the current block's timestamp, locking the event forever and making it impossible to modify the deadline or proceed with event registration.
The contract will be locked indefinitely if _days = 0 is provided, preventing any participants from signing up or interacting with the event after the deadline.
Manual code review
Add a validation check to ensure that _days is not equal to 0 before setting 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.