fix: update regex
Some checks failed
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled

This commit is contained in:
aclist 2026-07-04 14:30:59 +09:00
parent 2418d8be68
commit 78151b3bb3
2 changed files with 1 additions and 2 deletions

View File

@ -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]

View File

@ -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