Also redact psql password if it exists

This commit is contained in:
Alexandre Aubin 2019-07-02 15:55:31 +02:00
parent aa621abf57
commit 18f3540e2f

View file

@ -338,7 +338,10 @@ class OperationLogger(object):
self.logger = None
self._name = None
self.data_to_redact = []
self.data_to_redact.append(open("/etc/yunohost/mysql", "r").read().strip())
for filename in ["/etc/yunohost/mysql", "/etc/yunohost/psql"]:
if os.path.exists(filename):
self.data_to_redact.append(read_file(filename).strip())
self.path = OPERATIONS_PATH