mirror of
https://github.com/aclist/dztui.git
synced 2026-08-26 01:37:18 +02:00
fix: update regex
Some checks failed
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
Some checks failed
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
This commit is contained in:
parent
2418d8be68
commit
78151b3bb3
@ -4,7 +4,7 @@ from typing import Literal
|
||||
|
||||
api_filter = r"(.*&key=)([^&]*)(.*)"
|
||||
# FIXME: handle whitespace after directory name ($HOME root)
|
||||
home_filter = r"(/home/)([^/]*)(.*)"
|
||||
home_filter = r"(/home/)([^\s'\/]*)(.*)"
|
||||
REDACTED = r"\1REDACTED\3"
|
||||
REDACTION_PATTERNS = [api_filter, home_filter]
|
||||
|
||||
|
||||
@ -51,5 +51,4 @@ def test_log_redaction(log_error: str, expect: str) -> None:
|
||||
|
||||
logger.critical(log_error)
|
||||
redacted = handler.pop()
|
||||
print(redacted)
|
||||
assert expect == redacted
|
||||
|
||||
Loading…
Reference in New Issue
Block a user