Hawk High

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

Unlimited Student Enrollment in enroll() Function

Summary

The enroll() function does not enforce a cap on how many students can be enrolled per season. This allows unlimited student registrations in 4 weeks.

Vulnerability Details

function enroll() external notYetInSession { ... }

Impact

Excessive students may be enrolled in a single season.

  • This can lead to logistical or financial imbalance (e.g., bursary mismanagement, unfair teacher workload).

  • Breaks the expected invariant that a school has a finite capacity.

Tools Used

manual review

Recommendations

Introduce a maxStudents state variable and enforce it within the function.

if (listOfStudents.length >= maxStudents) {
revert HH__MaxStudentsReached();
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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