mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
miniflux: Mark secret strings in privileged actions
Fixes: #2435 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
7dda5455d8
commit
bec5e593b3
@ -10,7 +10,7 @@ from urllib.parse import urlparse
|
||||
import pexpect
|
||||
|
||||
from plinth import action_utils, db
|
||||
from plinth.actions import privileged
|
||||
from plinth.actions import privileged, secret_str
|
||||
from plinth.utils import is_non_empty_file
|
||||
|
||||
STATIC_SETTINGS = {
|
||||
@ -83,7 +83,7 @@ def _run_miniflux_interactively(command: str, username: str,
|
||||
|
||||
|
||||
@privileged
|
||||
def create_admin_user(username: str, password: str):
|
||||
def create_admin_user(username: str, password: secret_str):
|
||||
"""Create a new admin user for Miniflux CLI.
|
||||
|
||||
Raise exception if a user with the name already exists or otherwise fails.
|
||||
@ -96,7 +96,7 @@ def create_admin_user(username: str, password: str):
|
||||
|
||||
|
||||
@privileged
|
||||
def reset_user_password(username: str, password: str):
|
||||
def reset_user_password(username: str, password: secret_str):
|
||||
"""Reset a user password using Miniflux CLI.
|
||||
|
||||
Raise exception if the user does not exist or otherwise fails.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user