From 291f44d1b57223b54e897256e4e8650ba4f49a3d Mon Sep 17 00:00:00 2001 From: Atanas Janeshliev Date: Tue, 1 Apr 2025 10:15:12 +0200 Subject: [PATCH] fix(BRIDGE-332): filter new line characters from username and password fields in GUI --- .../frontend/bridge-gui/bridge-gui/qml/SetupWizard/Login.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/Login.qml b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/Login.qml index 141fbe4c..2b5f0cb7 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/Login.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/Login.qml @@ -271,7 +271,10 @@ FocusScope { usernameTextField.enabled = false; passwordTextField.enabled = false; loading = true; - Backend.login(usernameTextField.text, Qt.btoa(passwordTextField.text)); + + let usernameTextFiltered = usernameTextField.text.replace(/[\n\r]+$/, ""); + let passwordTextFiltered = passwordTextField.text.replace(/[\n\r]+$/, ""); + Backend.login(usernameTextFiltered, Qt.btoa(passwordTextFiltered)); } Layout.fillWidth: true