Potential to Bypass the Initial Check in the If Statement
Due to the default value of the Status
enum being set to NICE
, it is possible for the checkTwice
function to pass the if statement even when the checkedOnce
status has not been assigned. This occurs when an operator calls checkTwice
with a NICE
status without previously assigning checkedOnce
, leading to unintended behavior.
There's a risk that the checkedTwice
status might be assigned without the prerequisite checkedOnce
status being set, which could lead to incorrect system behavior or data integrity issues.
The default value of the Status
enum should be changed. Additionally, implement a check to confirm whether checkedOnce
is set to UNKNOWN
or not before proceeding with checkTwice
.
In Solidity the first element of an enum is the default value. In Santa's List, the means each person is mapped by default to 'NICE'.
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.