Skip to content

[API] Match state transition allows skipping veto, checkIntoMatch hardcoded false, fragment NaN #380

@Flegma

Description

@Flegma

Summary

Several logic errors in match flow control and API responses.

Findings

  • matches.controller.ts — condition uses || instead of &&, allowing match start during Veto.
  • matches.controller.ts — checkIntoMatch returns success: false always, regardless of actual result.
  • match-relay.controller.ts — parseInt(fragment) with no validation (could be NaN, negative, or huge).

Impact

Matches could skip veto. Clients can never confirm check-in success. Fragment parsing could cause logic errors.

Suggested Fix

Fix boolean operator. Return actual success status. Validate parseInt with bounds checking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-mediumCode quality & robustnessaudit-2026-03From March 2026 codebase auditlogic-errorLogic or state machine bugservice:api5stackgg/api service

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions