Hawk High

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

`reviewCount` Is Never Incremented

reviewCount Is Never Incremented

Summary

The reviewCount mapping is intended to limit the number of reviews a student can receive, but it is never incremented, making the check ineffective.

Vulnerability Details

The function reviewStudent() includes this check:

require(reviewCount[_student] < 5, "Student review count exceeded!!!");

However, no code ever increments reviewCount[_student], so this condition will always pass.

Impact

Any teacher can provide unlimited reviews to a student, possibly inflating their record or bypassing intended constraints.

Tools Used

Manual review

Recommendations

After the review is added, increment the count:

reviewCount[_student]++;
Updates

Lead Judging Commences

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

reviewCount not updated

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

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