fix(multiplayer): centralize arena path validation

This commit is contained in:
Josh Creek
2026-09-01 21:18:48 +01:00
parent bfeb822279
commit 701d7a9a2e
4 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -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 {