Lack of access control for ScoreBoard::setPrediction
.
The function ScoreBoard::setPrediction
is used by players to place or update predictions. However, due to no access control of the function anyone can update someone's placed bet.
Anyone can change players prediction
Manual Review
Add the following test case to ThePredicter.test.sol
Run the following command forge test --mt test_anyoneCanModifySomeonesBet
Observe that no revert occured.
Follow the following steps:
Make the function ScoreBoard::setPrediction
accessible only by the ThePredicter
contract
Create a function that allows prediction updating and make sure that msg.sender
can update only his/her predictions. This function needs to be in the ThePredicter
contract and should call the ScoreBoard::setPrediction
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.