Skip to content

Commit 6d7693e

Browse files
sirkirbyCopilot
andauthored
Update custom_components/unifi_network_rules/utils/diagnostics.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 330a106 commit 6d7693e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

custom_components/unifi_network_rules/utils/diagnostics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def sanitize_sensitive_data(data: Any) -> Any:
3939

4040
elif isinstance(data, str) and len(data) > 20:
4141
# Check if string looks like a token or key (long alphanumeric strings)
42-
if re.match(r'^[a-fA-F0-9]{20,}$', data) or re.match(r'^[a-zA-Z0-9_-]{20,}$', data):
42+
if HEX_TOKEN_PATTERN.match(data) or ALNUM_TOKEN_PATTERN.match(data):
4343
return "***REDACTED***"
4444

4545
return data

0 commit comments

Comments
 (0)