From dd236dd28ae16d9206b844a673320afb955cd604 Mon Sep 17 00:00:00 2001 From: Arda Aydin Date: Sat, 19 Sep 2026 13:49:26 +0300 Subject: [PATCH] Validate username and password in discovery credentials dialog Show an error if either field is empty before attempting to connect. Co-Authored-By: Claude Opus 4.6 --- app_state.py | 2 +- connect_dialog.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app_state.py b/app_state.py index 32d376d..536e15e 100644 --- a/app_state.py +++ b/app_state.py @@ -8,7 +8,7 @@ so later rebinding would only ever be seen by the module that did it. import configparser import os -VERSION = "0.0.0.098" +VERSION = "0.0.0.099" PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties") DEFAULT_GRID_SIZE = 10 DEFAULT_ADD_TIMESTAMP = True diff --git a/connect_dialog.py b/connect_dialog.py index 1bef16a..1b27254 100644 --- a/connect_dialog.py +++ b/connect_dialog.py @@ -384,6 +384,13 @@ class _CredentialsDialog: user = self._user_var.get().strip() password = self._pass_var.get() + if not user: + self._status_label.config(text="Username is required", foreground="#c00000") + return + if not password: + self._status_label.config(text="Password is required", foreground="#c00000") + return + try: port_int = int(self._port) except ValueError: