Skip to content

Commit

Permalink
Obscure SSID and BSSID
Browse files Browse the repository at this point in the history
Obscure wifi details from logs as they could be considered personally identifiable.
  • Loading branch information
rozza-m authored Feb 1, 2021
1 parent adc5891 commit af7a301
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/sonoff/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
'<a href="%s" target="_blank">Open Log<a> | '
'[New Issue on GitHub](https://github.com/AlexxIT/SonoffLAN/issues/new) | '
Expand Down

0 comments on commit af7a301

Please sign in to comment.