https://github.com/Cyfrin/2024-07-the-predicter/blob/main/src/ThePredicter.sol#L46-L60
This check verifies if a player is already in the Pending state but doesn’t consider whether the player is already in the players array as an Approved player.
If a player is registered as Approved but tries to register again, this logic won't catch it. Instead, it only checks for players in the Pending state.
ThePredicter::register() function only checks if a player’s status is Pending
, allowing players who are Approved
or Canceled
to re-register. As we can see in:
Players who have been previously approved or canceled can re-register, gaining multiple entries, which undermines the fairness of the registration process.
Players who cancel their registration could bypass the registration check and re-register, potentially creating unintended behavior.
Manual
Update the condition to check for both Status.Pending
and Status.Approved
.
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.