From c8d4bbf82b4f411c08a346b392747d4761a15992 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 10 Jun 2021 15:44:00 +0200 Subject: [PATCH] Case-incensitive search are likely to catch too mnuch legitimate stuff resulting in redacting a shitload of stuff --- src/yunohost/log.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index b70725b48..d36671ce2 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -415,9 +415,8 @@ class RedactingFormatter(Formatter): # (the secret part being at least 3 chars to avoid catching some lines like just "db_pwd=") # Some names like "key" or "manifest_key" are ignored, used in helpers like ynh_app_setting_set or ynh_read_manifest match = re.search( - r"(pwd|pass|password|passphrase|secret\w*|\w+key|token)=(\S{3,})$", + r"(pwd|pass|password|passphrase|secret\w*|\w+key|token|PASSPHRASE)=(\S{3,})$", record.strip(), - re.IGNORECASE ) if ( match