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
@@ -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