We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c166335 commit 3afb421Copy full SHA for 3afb421
homeassistant/components/foscam/camera.py
@@ -3,6 +3,7 @@
3
from __future__ import annotations
4
5
import asyncio
6
+from urllib.parse import quote
7
8
import voluptuous as vol
9
@@ -152,7 +153,9 @@ def camera_image(
152
153
async def stream_source(self) -> str | None:
154
"""Return the stream source."""
155
if self._rtsp_port:
- return f"rtsp://{self._username}:{self._password}@{self._foscam_session.host}:{self._rtsp_port}/video{self._stream}"
156
+ _username = quote(self._username)
157
+ _password = quote(self._password)
158
+ return f"rtsp://{_username}:{_password}@{self._foscam_session.host}:{self._rtsp_port}/video{self._stream}"
159
160
return None
161
0 commit comments