mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
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 <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
533fea5815
commit
fa5648cf18
@ -13,7 +13,7 @@ import time
|
|||||||
import augeas
|
import augeas
|
||||||
|
|
||||||
from plinth import action_utils
|
from plinth import action_utils
|
||||||
from plinth.actions import privileged
|
from plinth.actions import privileged, secret_str
|
||||||
|
|
||||||
CONTAINER_NAME = 'nextcloud-freedombox'
|
CONTAINER_NAME = 'nextcloud-freedombox'
|
||||||
SERVICE_NAME = 'nextcloud-freedombox'
|
SERVICE_NAME = 'nextcloud-freedombox'
|
||||||
@ -146,7 +146,7 @@ def set_trusted_domains(domains: list[str]):
|
|||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def set_admin_password(password: str):
|
def set_admin_password(password: secret_str):
|
||||||
"""Set password for owncloud-admin"""
|
"""Set password for owncloud-admin"""
|
||||||
_run_occ('user:resetpassword', '--password-from-env', GUI_ADMIN,
|
_run_occ('user:resetpassword', '--password-from-env', GUI_ADMIN,
|
||||||
env={'OC_PASS': password})
|
env={'OC_PASS': password})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user