mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
pagekite: 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
195602e7f1
commit
533fea5815
@ -6,7 +6,7 @@ import os
|
|||||||
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
|
||||||
from plinth.modules.pagekite import utils
|
from plinth.modules.pagekite import utils
|
||||||
|
|
||||||
PATHS = {
|
PATHS = {
|
||||||
@ -85,7 +85,7 @@ def get_config() -> dict[str, object]:
|
|||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def set_config(frontend: str, kite_name: str, kite_secret: str):
|
def set_config(frontend: str, kite_name: str, kite_secret: secret_str):
|
||||||
"""Set pagekite kite name, secret and frontend URL."""
|
"""Set pagekite kite name, secret and frontend URL."""
|
||||||
aug = _augeas_load()
|
aug = _augeas_load()
|
||||||
aug.remove(PATHS['abort_not_configured'])
|
aug.remove(PATHS['abort_not_configured'])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user