mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
1d58dcaae1
commit
d900b2c9b1
@ -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']:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user