Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Player can pay multiple times in `ThePredicter::register` when not supposed to

Summary

Player can pay multiple times in ThePredicter::register when not supposed to. If the player is approved, the player can call ThePredicter::register and pay again which leads to the player getting status PENDING again.

Vulnerability Details

Even if this is not necessarily a security hole, the player can lose money by calling this function by mistake. Not to mention, the player gets its status set to Pending again even when added/approved as a player.

Impact

Low

Tools Used

Code inspection

Recommendations

Add a check so Approved players cannot register again:

- if (playersStatus[msg.sender] == Status.Pending) {
+ if (playersStatus[msg.sender] == Status.Pending || playersStatus[msg.sender] == Status.Approved) {
revert ThePredicter__CannotParticipateTwice();
}
Updates

Lead Judging Commences

NightHawK Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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