this bug happens due to the LevelOne::inSession
doesn't set any where in the contract, make the school session never being set which is a critical wrong flaw, as at this point the shcool session will never end, and there will not be a new school sessions applied, no new students will be able to apply for new shcool sessions and no new teachers will be hiring.
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 testIfSessionIsBeingSet -vvv
4- the output would be as the following :
The shcool session will never end, and there will not be a new school sessions applied (due to no new session could be started while an exisitng session running), no new students will be able to apply for new shcool sessions and no new teachers will be hiring.
manual Recon
foundry test suite
in the LevelOne::graduateAndUpgrade
function add the following check :
`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.