remove cleartext root password from settings and history
This commit is contained in:
@ -84,6 +84,15 @@ class History(Tab):
|
||||
el.JsonEditor(properties=properties)
|
||||
with ui.tab_panel(response_tab):
|
||||
response = e.args["data"]["response"]
|
||||
lines = response.splitlines()
|
||||
response_lines = []
|
||||
for line in lines:
|
||||
if line.strip().startswith("root_password"):
|
||||
response_lines.append('root_password = "SECRET"')
|
||||
else:
|
||||
response_lines.append(line)
|
||||
|
||||
response = "\n".join(response_lines)
|
||||
ui.code(response).tailwind.height("[320px]").width("[640px]")
|
||||
|
||||
with el.WRow() as row:
|
||||
|
||||
@ -66,7 +66,7 @@ class Setting(Tab):
|
||||
control = el.FInput(
|
||||
label=key,
|
||||
password=True if key == "root_password" else False,
|
||||
password_toggle_button=True if key == "root_password" else False,
|
||||
password_toggle_button=False,
|
||||
on_change=lambda e, key=key: self.set_key(key, e.value),
|
||||
)
|
||||
self._elements[key] = {
|
||||
|
||||
Reference in New Issue
Block a user