Hawk High

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

Missing Session Status Check in Review Function

Summary

The giveReview function in LevelOne.sol lacks a check for the inSession status, allowing teachers to give reviews even when the school is not in session.

Vulnerability Details

  • giveReview function doesn't verify if inSession is true

  • Teachers can give reviews outside of active sessions

  • No validation against the session period

  • Reviews can be given before session start or after session end

Impact

Low: This vulnerability:

  • Allows reviews outside of intended session periods

  • Could lead to unfair student evaluations

  • Breaks the intended session-based review system

  • May cause confusion in student performance tracking

Tools Used

Manual code review

Recommendations

Add session status check to giveReview:

function giveReview(address _student, bool review) public onlyTeacher {
if (!inSession) {
revert("School is not in session");
}
// ... rest of the function
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge 26 days 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.