The graduateAndUpgrade function is supposed to handle the distribution of payments and system upgrades at the end of a session. However, it does not include a check on sessionEnd, which allows the principal to call the function before the session ends.
Based on the invariant: "System upgrade cannot take place unless the school’s sessionEnd has been reached.", the function graduateAndUpgrade is supposed to only execute after the school’s session has ended, However, there is no condition or modifier in the function to validate that the session has actually ended before proceeding with the upgrade. As a result, it can bypasses the lifecycle control and could lead to inconsistent or incorrect system states, including improperly timed rewards and upgrades.
The system can be upgraded and payments can be distributed before the session has actually ended, breaking the intended flow of operations
Manual Review
Ensure the function only executes after the session has officially ended.
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
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.