mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
fix(multiplayer): validate ranked arena paths durably
This commit is contained in:
@@ -234,8 +234,8 @@ func ClaimAllocatingMatch(ctx context.Context, db *sql.DB, transport string, now
|
||||
if build == "" {
|
||||
return fmt.Errorf("allocating match has no participants")
|
||||
}
|
||||
if domain.Playlist(playlist) == domain.Ranked && !arenaPath.Valid {
|
||||
return fmt.Errorf("ranked allocating match has no arena")
|
||||
if domain.Playlist(playlist) == domain.Ranked && (!arenaPath.Valid || !domain.IsRankedArenaPath(arenaPath.String)) {
|
||||
return fmt.Errorf("ranked allocating match has invalid arena")
|
||||
}
|
||||
item.Request = domain.AllocationRequest{AllocationID: claimedID, MatchID: matchID, Playlist: domain.Playlist(playlist), Region: region, Build: build, Protocol: protocol, ArenaPath: arenaPath.String, Transport: transport}
|
||||
found = true
|
||||
|
||||
Reference in New Issue
Block a user