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

PuppyRaffle::getActivePlayerIndex misguides if the player is not active.

Summary

The function getActivePlayerIndex will not give accurate result if the player doesn't exist.

Vulnerability Details

If a player is not active then it returns 0, which will pretend to caller that the player is active and index is 0.

Tools Used

Manual Review

Recommendations

So, if a player is not active then it should revert with an error that the player doesn't exist instead of returning 0, which seems to misguide the caller.

Updates

Lead Judging Commences

Hamiltonite Lead Judge over 1 year 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.