Skip to content

Commit

Permalink
fix(cloud): fix email obfuscation
Browse files Browse the repository at this point in the history
  • Loading branch information
rokam committed Jul 26, 2024
1 parent fbbc1c7 commit 31c50ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions midealocal/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ def _redact_data(data: str) -> str:
+ getattr(cr, "street_addresses", [])
)
for token in token_list:
m = len(token)
elm = r"\b" + token + r"\b"
item = token
if item[0] == "'":
item = item[1:]
m = len(item)
elm = r"\b" + item + r"\b"
data = re.sub(elm, block * m, data)
return data

Expand Down

0 comments on commit 31c50ff

Please sign in to comment.