mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
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:
parent
39d0c03700
commit
5c0b15d8f8
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user