mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-12 07:55:23 +08:00
fixup: GUI: Add configuration file sanitize check
This commit is contained in:
parent
1cc3e4a91f
commit
cfee12de53
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue