mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Escape passwords in paths for go2rtc
This commit is contained in:
parent
1a1a24b74d
commit
8c8f3c1790
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import requests
|
import requests
|
||||||
|
from frigate.util import escape_special_characters
|
||||||
|
|
||||||
from frigate.config import FrigateConfig
|
from frigate.config import FrigateConfig
|
||||||
|
|
||||||
@ -34,10 +35,10 @@ class RestreamApi:
|
|||||||
input.path.startswith("rtsp")
|
input.path.startswith("rtsp")
|
||||||
and not camera.restream.force_audio
|
and not camera.restream.force_audio
|
||||||
):
|
):
|
||||||
self.relays[cam_name] = input.path
|
self.relays[cam_name] = escape_special_characters(input.path)
|
||||||
else:
|
else:
|
||||||
# go2rtc only supports rtsp for direct relay, otherwise ffmpeg is used
|
# go2rtc only supports rtsp for direct relay, otherwise ffmpeg is used
|
||||||
self.relays[cam_name] = get_manual_go2rtc_stream(input.path)
|
self.relays[cam_name] = get_manual_go2rtc_stream(escape_special_characters(input.path))
|
||||||
|
|
||||||
for name, path in self.relays.items():
|
for name, path in self.relays.items():
|
||||||
params = {"src": path, "name": name}
|
params = {"src": path, "name": name}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user