Update flask and restructure into api folder with apis put into separate folders (#10193)

* Update flask

* Update flask and break apart different sections into different files

* formatting

* Fix test and add safety check
This commit is contained in:
Nicolas Mowen
2024-03-02 15:10:37 -07:00
committed by GitHub
parent 0022c1aad0
commit 3c4b1fb6f2
12 changed files with 2951 additions and 2845 deletions

View File

@@ -122,6 +122,9 @@ def clean_camera_user_pass(line: str) -> str:
def escape_special_characters(path: str) -> str:
"""Cleans reserved characters to encodings for ffmpeg."""
if len(path) > 1000:
return ValueError("Input too long to check")
try:
found = re.search(REGEX_RTSP_CAMERA_USER_PASS, path).group(0)[3:-1]
pw = found[(found.index(":") + 1) :]