🐛 Bug Report
Past Issues Searched
Issue is a Bug Report
Describe the bug
AIDojoCoordinator/coordinator.py contains a critical unauthenticated DoS in run_game().
At [AIDojoCoordinator/coordinator.py:422] parsing is attempted via Action.from_json(message). If parsing fails, the exception is logged ([lines 425-428]), but execution continues to match action.type ([line 429]). Because action was never assigned on parse failure, this triggers UnboundLocalError, which crashes the main action-processing coroutine.
A single malformed client packet can therefore kill central game action handling for all agents.
Reproduction
- Connect to the coordinator TCP port.
- Send malformed payload (e.g.,
not-a-json-message).
Action.from_json throws.
- Server then evaluates
action.type and crashes run_game().
Impact
- Service-wide denial of service.
- No authentication required.
- One packet is enough to break central gameplay processing.
Expected behavior
Malformed input should be handled safely:
- Return a
BAD_REQUEST style response to that client.
- Continue processing future messages.
- Never dereference
action unless parsing succeeded.
Screenshots
Not applicable.
Environment
- OS: macOS
- Browser: N/A (TCP service)
- Browser Version: N/A
Suggested fix
- In the
except block, enqueue an error response and continue the loop.
- Guard dispatch (
match action.type) behind successful parse.
- Add regression test: malformed packet must not terminate
run_game().
🐛 Bug Report
Past Issues Searched
Issue is a Bug Report
Describe the bug
AIDojoCoordinator/coordinator.pycontains a critical unauthenticated DoS inrun_game().At [AIDojoCoordinator/coordinator.py:422] parsing is attempted via
Action.from_json(message). If parsing fails, the exception is logged ([lines 425-428]), but execution continues tomatch action.type([line 429]). Becauseactionwas never assigned on parse failure, this triggersUnboundLocalError, which crashes the main action-processing coroutine.A single malformed client packet can therefore kill central game action handling for all agents.
Reproduction
not-a-json-message).Action.from_jsonthrows.action.typeand crashesrun_game().Impact
Expected behavior
Malformed input should be handled safely:
BAD_REQUESTstyle response to that client.actionunless parsing succeeded.Screenshots
Not applicable.
Environment
Suggested fix
exceptblock, enqueue an error response andcontinuethe loop.match action.type) behind successful parse.run_game().