Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: medium
Likelihood: high
Invalid

Incorrect Review Count Limit Check

Summary

The giveReview function in LevelOne.sol has an incorrect review count limit check that allows students to receive more reviews than intended.

Vulnerability Details

Current check:

require(reviewCount[_student] < 5, "Student review count exceeded!!!");
  • This allows a student to receive a 5th review when they already have 4

  • The check should be reviewCount[_student] < 4 to limit to exactly 4 reviews

Impact

Medium: This vulnerability:

  • Allows students to receive more reviews than intended

  • Breaks the intended review limit system

  • Could lead to unfair student evaluations

Tools Used

Manual code review

Recommendations

Fix the review count check:

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

Lead Judging Commences

yeahchibyke Lead Judge 26 days ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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