From 2e54daa61f139c7533def7f9dafac935eca2f913 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sat, 12 Feb 2022 14:03:26 -0800 Subject: [PATCH] Redact stream url credentials in debug logging (#66407) --- homeassistant/components/stream/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/stream/__init__.py b/homeassistant/components/stream/__init__.py index 79506c0bda2..be166d13455 100644 --- a/homeassistant/components/stream/__init__.py +++ b/homeassistant/components/stream/__init__.py @@ -312,7 +312,9 @@ class Stream: def update_source(self, new_source: str) -> None: """Restart the stream with a new stream source.""" - self._logger.debug("Updating stream source %s", new_source) + self._logger.debug( + "Updating stream source %s", redact_credentials(str(new_source)) + ) self.source = new_source self._fast_restart_once = True self._thread_quit.set() @@ -359,7 +361,7 @@ class Stream: self._logger.debug( "Restarting stream worker in %d seconds: %s", wait_timeout, - self.source, + redact_credentials(str(self.source)), ) self._worker_finished()