To prevent ugly unhandled cases like #3523

This commit is contained in:
Miroslav Stampar
2019-03-07 14:55:25 +01:00
parent 09e8c26f8a
commit 6666188857
3 changed files with 5 additions and 5 deletions

View File

@@ -3501,7 +3501,7 @@ def maskSensitiveData(msg):
retVal = retVal.replace(value, '*' * len(value))
# Just in case (for problematic parameters regarding user encoding)
for match in re.finditer(r"(?i)[ -]-(u|url|data|cookie)( |=)(.*?)(?= -?-[a-z]|\Z)", retVal):
for match in re.finditer(r"(?i)[ -]-(u|url|data|cookie|auth-\w+|proxy)( |=)(.*?)(?= -?-[a-z]|\Z)", retVal):
retVal = retVal.replace(match.group(3), '*' * len(match.group(3)))
# Fail-safe substitution