mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 21:02:21 +01:00
The direct ROM-file endpoints (`get_romfile` and `get_romfile_content`) resolved a RomFile purely by its user-supplied id and never mapped it back to the parent Rom, so an authenticated user with roms.read could read or download a file of a ROM hidden from them by knowing/guessing the RomFile.id, bypassing the hidden ROM/platform policy. Resolve the parent Rom and apply assert_rom_visible (404-masking) before returning any file bytes or metadata, matching the ROM-level content endpoints and the existing check in patch.py. Generated-By: PostHog Code Task-Id: 149c191c-7a22-4cf6-aafd-4dcf53f4fba0