Files
romm/backend/endpoints
Georges-Antoine Assi c9a8ceedd7 fix: enforce hidden-ROM/platform visibility on asset download and streaming endpoints
Several endpoints authorized cross-user access by the is_public flag (or
by scope alone for streaming) without re-checking whether the parent ROM
or platform is hidden from the caller. A user blocked from a ROM/platform
could still download a public save/state/screenshot attached to it, or
claim a streaming session for it, by supplying the asset/ROM id directly.

Route all four through the existing assert_rom_visible() 404-masking
helper, right after loading the record and before any file access or
broker launch, matching the ROM detail/content endpoints.

- saves.py / states.py / screenshots.py download_* : public sharing no
  longer overrides the hidden-resource boundary.
- streaming.py claim_session : hidden ROM/platform can no longer be
  launched via its id; broker is never contacted.

Regression tests cover hidden-ROM and hidden-platform cascade for each
endpoint, plus a positive control that public sharing still works when
the ROM is visible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 11:04:49 -04:00
..
2026-03-08 14:51:28 -04:00
2026-03-15 11:25:39 -04:00
2026-06-21 17:42:25 -04:00
2026-07-02 11:16:07 +09:00
2025-12-07 16:34:22 -05:00
2026-07-01 08:58:00 -04:00