From 3fa3ec2264158bbadf78a79d08766aa4e33193ac Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Sat, 11 May 2024 03:36:13 +0200 Subject: [PATCH] Fix server not being set when logging in from UI --- gui/src/gui/login.py | 2 +- gui/src/gui/quickaccess.py | 3 +++ gui/src/services/goldwarden.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gui/src/gui/login.py b/gui/src/gui/login.py index 0a8179b..a3e6e5c 100644 --- a/gui/src/gui/login.py +++ b/gui/src/gui/login.py @@ -50,7 +50,7 @@ def on_login(self): client_id = self.client_id_row.get_text() client_secret = self.client_secret_row.get_text() server = self.server_row.get_text() - goldwarden.set_url(server) + print("setting server to", server, "with result", goldwarden.set_server(server)) if client_id != "": goldwarden.set_client_id(client_id) if client_secret != "": diff --git a/gui/src/gui/quickaccess.py b/gui/src/gui/quickaccess.py index 100b2c6..4030814 100644 --- a/gui/src/gui/quickaccess.py +++ b/gui/src/gui/quickaccess.py @@ -69,6 +69,9 @@ def key_press(self, event, keyval, keycode, state): auto_type_combo = state & Gdk.ModifierType.CONTROL_MASK and state & Gdk.ModifierType.SHIFT_MASK copy_combo = state & Gdk.ModifierType.CONTROL_MASK and not state & Gdk.ModifierType.SHIFT_MASK + if not len(self.filtered_logins) > 0: + return + # totp code if keyval == Gdk.KEY_t or keyval == Gdk.KEY_T: if self.filtered_logins[self.selected_index]["totp"] == "": diff --git a/gui/src/services/goldwarden.py b/gui/src/services/goldwarden.py index d691c17..41755cd 100644 --- a/gui/src/services/goldwarden.py +++ b/gui/src/services/goldwarden.py @@ -70,8 +70,8 @@ def set_notification_url(url): def set_vault_url(url): send_authenticated_command(f"config set-vault-url {url}") -def set_url(url): - send_authenticated_command(f"config set-url {url}") +def set_server(url): + send_authenticated_command(f"config set-server {url}") def get_environment(): result = send_authenticated_command(f"config get-environment")