mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
enforce camera access in chat start_camera_watch tool
The start_camera_watch tool called via POST /chat/completion did not validate camera access, allowing a restricted viewer to start VLM monitoring on cameras outside their allowed set through the chat interface.
This commit is contained in:
parent
082f025509
commit
9a0ac6ee70
@ -673,6 +673,8 @@ async def _execute_start_camera_watch(
|
||||
if camera not in config.cameras:
|
||||
return {"error": f"Camera '{camera}' not found."}
|
||||
|
||||
await require_camera_access(camera, request=request)
|
||||
|
||||
genai_manager = request.app.genai_manager
|
||||
vision_client = genai_manager.vision_client or genai_manager.tool_client
|
||||
if vision_client is None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user