Due to the lack of checks, the principal can upgrade at will.
The vulnerability is located in the graduateAndUpgrade()
function of the LevelOne.sol
file.
The following is the description of the contract:
Students must have gotten all reviews before system upgrade. System upgrade should not occur if any student has not gotten 4 reviews (one for each week);
Any student who doesn't meet the
cutOffScore
should not be upgraded;System upgrade cannot take place unless school's
sessionEnd
has reached;
Students must receive four reviews and all of them must meet the cutOffScore
before the system can be upgraded. However, the principal
can call this function at will.
This can lead to the principal violating the rules.
Add some necessary check logic.
`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.