mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 16:33:43 +00:00
fix(multiplayer): centralize arena path validation
This commit is contained in:
@@ -137,7 +137,7 @@ func (a *Allocator) PublishAssignment(allocationID string, manifest AllocationMa
|
||||
}
|
||||
|
||||
func validateAllocationRequest(request AllocationRequest) error {
|
||||
if request.AllocationID == "" || request.MatchID == "" || request.Region == "" || request.Build == "" || request.Protocol <= 0 || (request.Transport != "enet" && request.Transport != "steam_sdr") {
|
||||
if request.AllocationID == "" || request.MatchID == "" || request.Region == "" || request.Build == "" || request.Protocol <= 0 || (request.Transport != "enet" && request.Transport != "steam_sdr") || (request.ArenaPath != "" && !IsRankedArenaPath(request.ArenaPath)) {
|
||||
return ErrAllocationInput
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user