From cfee12de53714efbddcc979ae0c92f464b0522e4 Mon Sep 17 00:00:00 2001 From: deajan Date: Wed, 12 Feb 2025 20:24:15 +0100 Subject: [PATCH] fixup: GUI: Add configuration file sanitize check --- npbackup/gui/config.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/npbackup/gui/config.py b/npbackup/gui/config.py index 5f501df..236be3a 100644 --- a/npbackup/gui/config.py +++ b/npbackup/gui/config.py @@ -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