The giveReview()
function is designed to allow teachers to review students once per week. It includes a reviewCount
check to prevent excessive reviews but never increments the reviewCount
variable, effectively bypassing the limit.
The line 281 :
require(reviewCount[_student] < 5, "Student review count exceeded!!!");
intends to limit the number of reviews a student can receive. However, reviewCount[_student]
is never incremented after a review is given.
This results in:
Students being reviewable an infinite number of times,
Graduation logic relying on review count becoming faulty,
Potential abuse of the system (e.g. endless penalties or bonuses).
Without incrementing reviewCount
, the system assumes students are never fully reviewed. This may prevent the contract from being upgraded (once the review check is added), or allow malicious review spam to alter scores unfairly.
Manual code review
After a review is given, include the following line:
reviewCount[_student] += 1;
This ensures the weekly review counter properly reflects the number of reviews each student has received.
`reviewCount` for students is not updated after each review session
`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.