Skip to content

Commit

Permalink
Don't print MQTT credentials to log (#37364)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery authored and balloob committed Jul 3, 2020
1 parent ec690bb commit 08ebc4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions homeassistant/components/mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,14 @@ async def async_setup_entry(hass, entry):
if conf is None:
conf = CONFIG_SCHEMA({DOMAIN: dict(entry.data)})[DOMAIN]
elif any(key in conf for key in entry.data):
_LOGGER.warning(
shared_keys = conf.keys() & entry.data.keys()
override = {k: entry.data[k] for k in shared_keys}
if CONF_PASSWORD in override:
override[CONF_PASSWORD] = "********"
_LOGGER.info(
"Data in your configuration entry is going to override your "
"configuration.yaml: %s",
entry.data,
override,
)

conf = _merge_config(entry, conf)
Expand Down

0 comments on commit 08ebc4c

Please sign in to comment.