From afa577c27061241f6ffb4d49c41e118452c07c53 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Fri, 25 Jul 2025 00:36:56 +1000 Subject: [PATCH] fix: trim whitespace and newlines from access url and token textfields --- Coder-Desktop/Coder-Desktop/Views/LoginForm.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Coder-Desktop/Coder-Desktop/Views/LoginForm.swift b/Coder-Desktop/Coder-Desktop/Views/LoginForm.swift index d2880dda..5e9227ff 100644 --- a/Coder-Desktop/Coder-Desktop/Views/LoginForm.swift +++ b/Coder-Desktop/Coder-Desktop/Views/LoginForm.swift @@ -58,6 +58,7 @@ struct LoginForm: View { func submit() async { loginError = nil + sessionToken = sessionToken.trimmingCharacters(in: .whitespacesAndNewlines) guard sessionToken != "" else { return } @@ -164,6 +165,7 @@ struct LoginForm: View { } private func next() { + baseAccessURL = baseAccessURL.trimmingCharacters(in: .whitespacesAndNewlines) guard baseAccessURL != "" else { return }