From fa5648cf189eb1238885efeff95ba80346555477 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sun, 4 Aug 2024 10:30:25 -0700 Subject: [PATCH] nextcloud: 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/nextcloud/privileged.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/nextcloud/privileged.py b/plinth/modules/nextcloud/privileged.py index 5770b0c56..14268c77f 100644 --- a/plinth/modules/nextcloud/privileged.py +++ b/plinth/modules/nextcloud/privileged.py @@ -13,7 +13,7 @@ import time import augeas from plinth import action_utils -from plinth.actions import privileged +from plinth.actions import privileged, secret_str CONTAINER_NAME = 'nextcloud-freedombox' SERVICE_NAME = 'nextcloud-freedombox' @@ -146,7 +146,7 @@ def set_trusted_domains(domains: list[str]): @privileged -def set_admin_password(password: str): +def set_admin_password(password: secret_str): """Set password for owncloud-admin""" _run_occ('user:resetpassword', '--password-from-env', GUI_ADMIN, env={'OC_PASS': password})