bepasty: Mark secret strings in privileged actions

Tests:

- Perform effected actions and ensure that secrets are not logged on the
console.

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:22 -04:00
1 parent 1d58dcaae1
commit d900b2c9b1
1 file changed
+2 -2
+2 -2
View File
@@ -15,7 +15,7 @@ import subprocess
import augeas
from plinth import action_utils
from plinth.actions import privileged
from plinth.actions import privileged, secret_str
from plinth.modules import bepasty
DATA_DIR = '/var/lib/bepasty'
@@ -137,7 +137,7 @@ def add_password(permissions: list[str], comment: str | None = None):
@privileged
def remove_password(password: str):
def remove_password(password: secret_str):
"""Remove a password and its permissions."""
conf = conf_file_read()
if password in conf['PERMISSIONS']: