Skip to content

Commit

Permalink
Add missing go runtime fn rank param check
Browse files Browse the repository at this point in the history
  • Loading branch information
sesposito committed Oct 20, 2023
1 parent 7fdede6 commit 4a92a62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/runtime_go_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,10 @@ func (n *RuntimeGoNakamaModule) LeaderboardRecordsListCursorFromRank(id string,
return "", errors.New("invalid leaderboard id")
}

if rank < 1 {
return "", errors.New("invalid rank - must be > 1")
}

if expiry < 0 {
return "", errors.New("expects expiry to equal or greater than 0")
}
Expand Down

0 comments on commit 4a92a62

Please sign in to comment.