Clean http password, clean path in debug config as well (#4519)

* Clean ffmpeg paths

* Clean http passwords too

* Make check optional
This commit is contained in:
Nicolas Mowen
2022-11-26 18:18:33 -07:00
committed by GitHub
parent 047c2408d2
commit 68248cc274
3 changed files with 14 additions and 6 deletions

View File

@@ -577,9 +577,14 @@ def events():
def config():
config = current_app.frigate_config.dict()
# add in the ffmpeg_cmds
for camera_name, camera in current_app.frigate_config.cameras.items():
camera_dict = config["cameras"][camera_name]
# clean paths
for input in camera_dict.get("ffmpeg", {}).get("inputs", []):
input["path"] = clean_camera_user_pass(input["path"])
# add clean ffmpeg_cmds
camera_dict["ffmpeg_cmds"] = copy.deepcopy(camera.ffmpeg_cmds)
for cmd in camera_dict["ffmpeg_cmds"]:
cmd["cmd"] = clean_camera_user_pass(" ".join(cmd["cmd"]))