Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

```getActivePlayerIndex(address player)``` will mislead people into believeing they are ```players[0]```

Summary

getActivePlayerIndex(address player) will mislead people into believeing they are players[0]

Vulnerability Details

When a user (not a player) called getActivePlayerIndex(address player) function, he will get 0. This will mislead him into believing he is players[0]

Impact

mislead users into believing they are already players

Tools Used

manual

Recommendations

replace return 0 with revert NotActivePlayer();

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

getActivePlayerIndex can say a player is both entered at slot 0 and inactive

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!