mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Catch pwd, pass and password as patterns for password
This commit is contained in:
parent
b26ec9c2fc
commit
6a00aac13a
1 changed files with 3 additions and 1 deletions
|
@ -308,7 +308,9 @@ class RedactingFormatter(Formatter):
|
|||
# Wrapping this in a try/except because we don't want this to
|
||||
# break everything in case it fails miserably for some reason :s
|
||||
try:
|
||||
match = re.search(r'(db_pwd|password)=(\S{3,})$', record.strip())
|
||||
# This matches stuff like db_pwd=the_secret or admin_password=other_secret
|
||||
# (the secret part being at least 3 chars to avoid catching some lines like just "db_pwd=")
|
||||
match = re.search(r'(pwd|pass|password)=(\S{3,})$', record.strip())
|
||||
if match and match.group(2) not in self.data_to_redact:
|
||||
self.data_to_redact.append(match.group(2))
|
||||
except Exception as e:
|
||||
|
|
Loading…
Add table
Reference in a new issue