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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2024-08-11 12:57:39 -04:00
1 parent 39d0c03700
commit 5c0b15d8f8
1 file changed
+2 -2
+2 -2
View File
@@ -7,7 +7,7 @@ import shutil
import subprocess import subprocess
import tempfile import tempfile
from plinth.actions import privileged from plinth.actions import privileged, secret_str
from plinth.utils import generate_password from plinth.utils import generate_password
MAINTENANCE_SCRIPTS_DIR = "/usr/share/mediawiki/maintenance" MAINTENANCE_SCRIPTS_DIR = "/usr/share/mediawiki/maintenance"
@@ -95,7 +95,7 @@ def _include_custom_config():
@privileged @privileged
def change_password(username: str, password: str): def change_password(username: str, password: secret_str):
"""Change the password for a given user.""" """Change the password for a given user."""
change_password_script = os.path.join(MAINTENANCE_SCRIPTS_DIR, change_password_script = os.path.join(MAINTENANCE_SCRIPTS_DIR,
'changePassword.php') 'changePassword.php')