mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
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>