Hawk High

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

Review Count Limit Not Enforced Due to Missing Increment

Summary

The giveReview function intends to limit students to 5 reviews but does not increment reviewCount, allowing unlimited reviews.

Vulnerability Details

The require(reviewCount[_student] < 5, ...) check always passes because reviewCount is never updated. Teachers can bypass the intended limit by waiting the reviewTime, affecting score fairness.

https://github.com/CodeHawks-Contests/2025-05-hawk-high/blob/3a7251910c31739505a8699c7a0fc1b7de2c30b5/src/LevelOne.sol#L281

Impact

Unlimited negative reviews can unfairly reduce student scores below the cutOffScore, preventing graduation despite paying fees.

Tools Used

Recommendations

Increment reviewCount[_student] within giveReview after each review to enforce the 5-review limit.

Updates

Lead Judging Commences

yeahchibyke Lead Judge
27 days ago
yeahchibyke Lead Judge 16 days ago
Submission Judgement Published
Validated
Assigned finding tags:

reviewCount not updated

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

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