fix(multiplayer): validate ranked arena paths durably

This commit is contained in:
Josh Creek
2026-09-01 21:07:56 +01:00
parent ff80ab46b7
commit bd617dbf06
8 changed files with 62 additions and 7 deletions
+2 -2
View File
@@ -120,8 +120,8 @@ func CreateMatchFromAcceptedProposal(ctx context.Context, db *sql.DB, plan Accep
if !validAcceptedPlaylistCount(domain.Playlist(playlist), len(plan.Players)) {
return fmt.Errorf("accepted proposal playlist does not match player count")
}
if domain.Playlist(playlist) == domain.Ranked && plan.ArenaPath == "" {
return fmt.Errorf("ranked accepted match plan has no arena")
if domain.Playlist(playlist) == domain.Ranked && !domain.IsRankedArenaPath(plan.ArenaPath) {
return fmt.Errorf("ranked accepted match plan has invalid arena")
}
participants, err := acceptedProposalParticipants(ctx, tx, plan)
if err != nil {