mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-29 00:06:19 +01:00
clean passwords when both rtsp and http present (#8399)
This commit is contained in:
parent
ba603c1937
commit
d1620b4e39
@ -114,10 +114,8 @@ def load_config_with_no_duplicates(raw_config) -> dict:
|
|||||||
|
|
||||||
def clean_camera_user_pass(line: str) -> str:
|
def clean_camera_user_pass(line: str) -> str:
|
||||||
"""Removes user and password from line."""
|
"""Removes user and password from line."""
|
||||||
if "rtsp://" in line:
|
rtsp_cleaned = re.sub(REGEX_RTSP_CAMERA_USER_PASS, "://*:*@", line)
|
||||||
return re.sub(REGEX_RTSP_CAMERA_USER_PASS, "://*:*@", line)
|
return re.sub(REGEX_HTTP_CAMERA_USER_PASS, "user=*&password=*", rtsp_cleaned)
|
||||||
else:
|
|
||||||
return re.sub(REGEX_HTTP_CAMERA_USER_PASS, "user=*&password=*", line)
|
|
||||||
|
|
||||||
|
|
||||||
def escape_special_characters(path: str) -> str:
|
def escape_special_characters(path: str) -> str:
|
||||||
|
Loading…
Reference in New Issue
Block a user