From af7a3019fab9d474a51ecdb3727818aa8d60ab9d Mon Sep 17 00:00:00 2001 From: rozza-m Date: Mon, 1 Feb 2021 15:59:26 +0000 Subject: [PATCH] Obscure SSID and BSSID Obscure wifi details from logs as they could be considered personally identifiable. --- custom_components/sonoff/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/sonoff/utils.py b/custom_components/sonoff/utils.py index 8e8a0813..3a970b25 100644 --- a/custom_components/sonoff/utils.py +++ b/custom_components/sonoff/utils.py @@ -180,7 +180,8 @@ def handle(self, rec: logging.LogRecord) -> None: # remove uiid, MAC, IP RE_PRIVATE = re.compile( r"\b([a-zA-Z0-9_-]{36,}|[A-F0-9:]{17}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|" - r"EWLK-\d{6}-[A-Z]{5})\b") + r"EWLK-\d{6}-[A-Z]{5})\b|" + r"(?<=ssid\': \')[A-Za-z0-9!#$%&()*+,.\/:;<=>?@\[\] ^_`{|}~-]{1,32}") NOTIFY_TEXT = ( 'Open Log | ' '[New Issue on GitHub](https://github.com/AlexxIT/SonoffLAN/issues/new) | '