LevelOne::graduateAndUpgrade
ignores students review count, students score and is it past sessionEnd, breaking several invariantsDescription: As described in the documentation, the system upgdade should occur only if any student has got 4 reviews, has met the cutOffScore
and the sessionEnd
has passed.
Impact: Breaking several invariants.
Proof of Concepts:
Place the following test in LevelOneAndGraduateTest.t.sol
You should receive the following or similar output:
Recommended mitigation: With the given invariants in the documentation, the graduateAndUpgrade
function should be modified to check the invariants before upgrading.
`reviewCount` for students is not updated after each review session
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
`reviewCount` for students is not updated after each review session
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
`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.