mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-05 10:28:51 +03:00
Verify motion search jobs belong to the requested camera
This commit is contained in:
@@ -182,7 +182,7 @@ async def get_motion_search_status_endpoint(
|
|||||||
)
|
)
|
||||||
|
|
||||||
job = get_motion_search_job(job_id)
|
job = get_motion_search_job(job_id)
|
||||||
if not job:
|
if not job or job.camera != camera_name:
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
content={"success": False, "message": "Job not found"},
|
content={"success": False, "message": "Job not found"},
|
||||||
status_code=404,
|
status_code=404,
|
||||||
@@ -253,7 +253,7 @@ async def cancel_motion_search_endpoint(
|
|||||||
)
|
)
|
||||||
|
|
||||||
job = get_motion_search_job(job_id)
|
job = get_motion_search_job(job_id)
|
||||||
if not job:
|
if not job or job.camera != camera_name:
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
content={"success": False, "message": "Job not found"},
|
content={"success": False, "message": "Job not found"},
|
||||||
status_code=404,
|
status_code=404,
|
||||||
|
|||||||
Reference in New Issue
Block a user