Addresses can enter the raffle multiple times
The function enterRaffle only checks if a duplicate address is found in the function input, but does not check if the address is already present in the storage variable players. This allows a player to enter his address twice by calling the function twice.
High.
n/a
Use a map (address => bool) which maps which addresses have entered for the raffle. When going through the newPlayers input array, for each address a check if players[a] == true. If so, revert because that address is already in raffle. Else, set players[a] = true. This solves the problem and also allows us to remove the code below, which is no longer necessary:
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.