This bug allows the Principal
to upgrade the system to claim the rewards and graduate the students, before the LevelOne::sessionEnd
has reached. giving the Principal
the ability to upgrade the contract at any time, which obviously breaks the protocl rules : System upgrade cannot take place unless school's sessionEnd has reached
1- Navigate to test/LeveOnelAndGraduateTest.t.sol
file.
2- Add the following PoC code to the test
file:
3- In the command line, run the following command: forge test --match-test testSystemUpgradableEvenSessionEndHasNotReached -vvv
4- The output would be:
Students and teachers will no longer have guarantees that rules are enforced, which could lead to loss trust.
giving Principal
the ability to update the contract to claim the rewards quicker and graduate the students before the school session passed (4 weeks)
, which is not guarantee for the students to take their reviews and complete their study period probably.
Manual Recon.
foundry Test Suite
.
in the LevelOne::graduateAndUpgrade
function add the following check at the beginning:
`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.