The giveReview function is intended to restrict the number of reviews a teacher can give to a student to a maximum of 4 (once per week in a 4-week session). However, the logic fails because reviewCount[_student] is never incremented after a review is submitted, allowing teachers to exceed the intended review limit.
The giveReview function is designed to allow teachers to submit a review for a student once per week, with a maximum of four reviews throughout the four-week session. This behavior is partially enforced by the following line in the giveReview function to cap the total number of reviews a student can receive.
However, the implementation fails to increment the reviewCount[_student] variable after a review is submitted. As a result, the conditional check becomes ineffective, since the count remains at its default value of zero, allowing teachers to bypass the review limit and continue reviewing the same student week after week. This flaw compromises the fairness and integrity of the evaluation system.
The following is the POC that allows the teacher to give more than 4 reviews for a specific student.
Teachers can bypass the intended limit of four reviews per student, allowing them to manipulate the student scores by giving more than 4 reviews, which leads to students being wrongly rewarded or penalized, breaking the fairness of the system.
Manual Review
Add the following line - reviewCount[_student]++; to fix the issue
`reviewCount` for students is not updated after each review session
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.