Hawk High

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

[EVMN-HH08] Missing Check for Active Session in `giveReview()`

Summary

Missing Check for Active Session in giveReview()

Vulnerability Details

The giveReview() function does not check if the school is currently in session. This could allow teachers to give reviews outside of the school session.

function giveReview(address _student, bool review) public onlyTeacher {
// No check for inSession
// ...
}

Impact

Medium

Tools Used

Manual review

Recommendations

Add a check to ensure the school is in session:

function giveReview(address _student, bool review) public onlyTeacher {
if (!inSession) {
revert HH__NotInSession();
}
if (!isStudent[_student]) {
revert HH__StudentDoesNotExist();
}
// ...
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 months 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.