https://github.com/Cyfrin/2024-07-the-predicter/blob/main/src/ThePredicter.sol#L72-L83
Duplicate Entry: The function adds the player to the players
array without checking if they are already present.
When a player with Status.Pending
is approved, their status is updated to Status.Approved
and they are added to the players
array using players.push(player)
. However, there is no check to see if the player is already in the players
array, leading to potential duplicate entries.
Players can appear multiple times in the players
array. This can cause incorrect handling of player-specific logic, such as scoring and rewards, leading to potential exploits where players might gain unfair advantages.
Manual
Add a loop to check if the player is already in the players array before adding them. If the player is found, the function reverts with an appropriate error.
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.