Files
romm/backend/tests
Georges-Antoine Assi 3abd0829b7 fix(roms): enforce parent ROM visibility on direct file endpoints
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
2026-07-07 09:28:27 -04:00
..
2026-06-13 15:39:55 -04:00
2026-07-01 08:58:00 -04:00
2026-07-01 10:44:00 -04:00
2026-03-23 16:43:24 -04:00