From 5c0b15d8f8c1161aa35e897e4e5e34a804eea42e Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sun, 4 Aug 2024 11:03:55 -0700 Subject: [PATCH] mediawiki: Mark secret strings in privileged actions Tests: - Run affected privileged actions through UI and notice that secret strings are not logged. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/mediawiki/privileged.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/mediawiki/privileged.py b/plinth/modules/mediawiki/privileged.py index d9994ad32..fa01c2b58 100644 --- a/plinth/modules/mediawiki/privileged.py +++ b/plinth/modules/mediawiki/privileged.py @@ -7,7 +7,7 @@ import shutil import subprocess import tempfile -from plinth.actions import privileged +from plinth.actions import privileged, secret_str from plinth.utils import generate_password MAINTENANCE_SCRIPTS_DIR = "/usr/share/mediawiki/maintenance" @@ -95,7 +95,7 @@ def _include_custom_config(): @privileged -def change_password(username: str, password: str): +def change_password(username: str, password: secret_str): """Change the password for a given user.""" change_password_script = os.path.join(MAINTENANCE_SCRIPTS_DIR, 'changePassword.php')