fixup: GUI: Add configuration file sanitize check

This commit is contained in:
deajan 2025-02-12 20:24:15 +01:00
parent 1cc3e4a91f
commit cfee12de53

View file

@ -316,13 +316,8 @@ def config_gui(full_config: dict, config_file: str):
"prometheus.http_password",
"prometheus.no_cert_verify",
"update_manager_password",
"permissions",
"manager_password",
) or key.startswith("prometheus.additional_labels"):
return
# Since FreeSimpleGUI does not allow to suppress the debugger anymore in v5.1.0, we need to handle KeyError
if key not in window.AllKeysDict:
raise KeyError
if key == "permissions":
window["current_permissions"].Update(combo_boxes["permissions"][value])
return
@ -334,6 +329,9 @@ def config_gui(full_config: dict, config_file: str):
window["manager_password_set"].Update(_t("generic.no"))
window["--SET-PERMISSIONS--"].Update(button_color="red")
return
# Since FreeSimpleGUI does not allow to suppress the debugger anymore in v5.1.0, we need to handle KeyError
if key not in window.AllKeysDict:
raise KeyError
# NPF-SEC-00009
# Don't show sensible info unless unencrypted requested