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

getActivePlayerIndex Function Returns Wrong Index

Summary

If the player address does not exist in the players array, function returns wrong index.

Vulnerability Details

In getActivePlayerIndex function if the player address is not in the players array. Normally it should not return any indexes. However currently function returns the first index.

Impact

The player addresses which are not active will be mixed with the first address in the players array. And first addresses account will be vulnerable

Tools Used

Manual reading.

Recommendations

If the target address is not in the players array, revert an error instead of returning wrong index

Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 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.