NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Ensure deleted export file name is safe (#8089)
Nicolas Mowen8941aa531138
diff --git a/frigate/http.py b/frigate/http.pyindex 94c24462c8..f9b64b0a41 100644--- a/frigate/http.py+++ b/frigate/http.py@@ -29,6 +29,7 @@ from peewee import DoesNotExist, fn, operatorfrom playhouse.shortcuts import model_to_dictfrom playhouse.sqliteq import SqliteQueueDatabasefrom tzlocal import get_localzone_name+from werkzeug.utils import secure_filenamefrom frigate.config import FrigateConfigfrom frigate.const import (@@ -1820,7 +1821,8 @@ def export_recording(camera_name: str, start_time, end_time):@bp.route("/export/<file_name>", methods=["DELETE"])def export_delete(file_name: str):- file = os.path.join(EXPORT_DIR, file_name)+ safe_file_name = secure_filename(file_name)+ file = os.path.join(EXPORT_DIR, safe_file_name)if not os.path.exists(file):return make_response(