The setPrediction
function is declared as public
, allowing any external actor to call it. However, the function should only be callable by the specific player it's intended for, indicating that it should have more restrictive visibility.
The function signature is as follows:
The public
visibility allows any external account or contract to call this function, potentially setting predictions for any player. This is a serious access control issue, as it allows unauthorized manipulation of predictions.
anyone can call this function directly whitout benn approved or pay the fees
Unauthorized Predictions: Any user can set predictions for any other user, completely bypassing any intended access controls.
Manual Code Review
Change the function visibility to internal
:
This ensures that only the contract itself or derived contracts can call this function.
setPrediction has no access control and allows manipulation to Players' predictions.
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.