Hawk High

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

[M-1] Missing Review Count Increment Allows Unlimited Reviews per Student

Description:

The giveReview function is intended to limit the number of reviews a student can receive to five, using the condition require(reviewCount[_student] < 5, "Student review count exceeded!!!");. However, the contract does not increment the reviewCount[_student] after each review is given. As a result, the condition is always true, and a student can receive an unlimited number of reviews, bypassing the intended review limit.

Impact:

This logic flaw allows students to receive unlimited reviews, which can lead to inflated or manipulated scores. The lack of control over the number of reviews undermines the fairness and integrity of the scoring system. If student rewards or progression depend on these scores, this opens the door to abuse or favoritism.

Tools used:

Manual reviews

Remediation:

Consoder replacing the if statement within the giveReview() function with the below code:

if (review) {
studentScore[_student] += 10;
} else {
studentScore[_student] -= 10;
}
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

Support

FAQs

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