From 98423a7f914a953f83a9bdd2e312800feb19e5f6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 20 Aug 2019 20:23:45 +0200 Subject: [PATCH] adding token to not be logged --- src/yunohost/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 8f8c92010..cf44ec21f 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -310,7 +310,7 @@ class RedactingFormatter(Formatter): try: # 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|secret|key)=(\S{3,})$', record.strip()) + match = re.search(r'(pwd|pass|password|secret|key|token)=(\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: