mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
fix(multiplayer): centralize arena path validation
This commit is contained in:
@@ -140,7 +140,7 @@ func RecordProviderAllocation(ctx context.Context, db *sql.DB, allocation domain
|
||||
}
|
||||
|
||||
func validAllocationInput(db *sql.DB, request domain.AllocationRequest, now time.Time) bool {
|
||||
return db != nil && request.AllocationID != "" && request.MatchID != "" && (request.Region == "EU" || request.Region == "NA") && request.Build != "" && request.Protocol > 0 && (request.Transport == "enet" || request.Transport == "steam_sdr") && !now.IsZero()
|
||||
return db != nil && request.AllocationID != "" && request.MatchID != "" && (request.Region == "EU" || request.Region == "NA") && request.Build != "" && request.Protocol > 0 && (request.Transport == "enet" || request.Transport == "steam_sdr") && (request.ArenaPath == "" || domain.IsRankedArenaPath(request.ArenaPath)) && !now.IsZero()
|
||||
}
|
||||
|
||||
func allocationRequestDigest(request domain.AllocationRequest) [32]byte {
|
||||
|
||||
Reference in New Issue
Block a user