mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-17 17:31:15 +03:00
enforce camera access in thumbnail tracked-object fallback
The /events/{id}/thumbnail endpoint called require_camera_access when
loading persisted events but skipped the check in the tracked-object
fallback path for in-progress events. A restricted viewer could
retrieve thumbnails from cameras they should not have access to.
This commit is contained in:
parent
85df969e82
commit
c2220c89a9
@ -896,6 +896,9 @@ async def event_thumbnail(
|
|||||||
if event_id in camera_state.tracked_objects:
|
if event_id in camera_state.tracked_objects:
|
||||||
tracked_obj = camera_state.tracked_objects.get(event_id)
|
tracked_obj = camera_state.tracked_objects.get(event_id)
|
||||||
if tracked_obj is not None:
|
if tracked_obj is not None:
|
||||||
|
await require_camera_access(
|
||||||
|
camera_state.name, request=request
|
||||||
|
)
|
||||||
thumbnail_bytes = tracked_obj.get_thumbnail(extension.value)
|
thumbnail_bytes = tracked_obj.get_thumbnail(extension.value)
|
||||||
except Exception:
|
except Exception:
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user