mantimon-tcg/backend/app
Cal Corum 0a9cd73daf Validate connection data integrity in ConnectionManager
Fix audit warnings about empty string defaults hiding data corruption:

1. get_connection_info(): Validate required fields (user_id, connected_at,
   last_seen) exist before creating ConnectionInfo. Return None and log
   warning for corrupted records instead of returning invalid data.

2. unregister_connection(): Log warning if user_id is missing during
   cleanup. Existing code safely handles this (skips cleanup), but now
   we have visibility into data corruption.

Test added for corrupted data case.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:03:17 -06:00
..
api Fix medium priority issues from code review 2026-01-28 14:32:08 -06:00
core Implement GameService.execute_action enhancements (GS-003) 2026-01-29 15:15:34 -06:00
data Phase 3: Collections + Decks - Services and DI architecture 2026-01-28 11:27:14 -06:00
db Fix security and validation issues from code review 2026-01-28 14:16:07 -06:00
repositories Fix medium priority issues from code review 2026-01-28 14:32:08 -06:00
schemas Add Phase 4 WebSocket infrastructure (WS-001 through GS-001) 2026-01-28 22:21:20 -06:00
services Validate connection data integrity in ConnectionManager 2026-01-29 19:03:17 -06:00
socketio Refactor to dependency injection pattern - no monkey patching 2026-01-28 22:54:57 -06:00
__init__.py Add backend foundation with uv, Black, and pre-commit hooks 2026-01-24 00:12:33 -06:00
config.py Fix security and validation issues from code review 2026-01-28 14:16:07 -06:00
main.py Add Phase 4 WebSocket infrastructure (WS-001 through GS-001) 2026-01-28 22:21:20 -06:00