Hawk High

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

Missing Review Count Update in `giveReview`

Vulnerability Details

The giveReview function allows teachers to submit weekly reviews on students. However, the function does not increment reviewCount[_student], even though it checks that the student hasn’t been reviewed more than 5 times.

LevelOne.sol#L281

Impact

  • A teacher can submit infinite reviews for a student since reviewCount[_student] is never incremented.

  • The require(reviewCount[_student] < 5, ...) check becomes meaningless.

Recommendations

reviewCount[_student]++;
Updates

Lead Judging Commences

yeahchibyke Lead Judge 3 months ago
Submission Judgement Published
Validated
Assigned finding tags:

reviewCount not updated

`reviewCount` for students is not updated after each review session

Support

FAQs

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