Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Valid

Session never ends

summary

Session never ends

vulnerability details

There is no function or mechanism provided when the LevelOne::inSession will become false , if we use the correct modifer which i have reported at here , conside this after using the correct modifer

Users can able to participate even after the LevelOne::sessionEnd time ends

impact - High

students can able to enroll even after the session ends

likelyhood - High

Recommendations

function enroll() external notYetInSession {
+ if (block.timestamp > sessionEnd) {
+ revert HH__SessionEnds();
+ }
if (isTeacher[msg.sender] || msg.sender == principal) {
revert HH__NotAllowed();
}
if (isStudent[msg.sender]) {
revert HH__StudentExists();
}
usdc.safeTransferFrom(msg.sender, address(this), schoolFees);
listOfStudents.push(msg.sender);
isStudent[msg.sender] = true;
studentScore[msg.sender] = 100;
bursary += schoolFees;
emit Enrolled(msg.sender);
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge about 1 month ago
Submission Judgement Published
Validated
Assigned finding tags:

session state not updated

`inSession` not updated after during upgrade

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.