The ThePredicter::makePrediction
function lacks a validation check for the matchNumber
parameter. Users can potentially enter a wrong match number, and lose funds.
The makePrediction
function does not validate if the matchNumber
is within the valid range (0 to 8). This allows users to pay the prediction fee for invalid match numbers, thinking they have already predicted since the state playersPredictions[player].isPaid[matchNumber]
will be true. But the number do not correspond to any actual match, leading to unnecessary expenditure.
Users can accidentally pay the prediction fee for invalid match numbers, causing them to lose money without recording their prediction.
Manual Review
Implement a validation check to ensure that the matchNumber
is within the valid range (0 to 8).
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.