From 32ae0fb558008a3bb30607c789ac6612ab8d6ecf Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:00:57 -0500 Subject: [PATCH] feat: trim username and password fields before login (#1687) --- lib/pages/login/login.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index a81916f8e..20c516108 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -153,7 +153,7 @@ class LoginController extends State { try { // #Pangea - String username = usernameController.text; + String username = usernameController.text.trim(); if (RegExp(r'^@(\w+):').hasMatch(username)) { username = RegExp(r'^@(\w+):').allMatches(username).elementAt(0).group(1)!; @@ -184,7 +184,10 @@ class LoginController extends State { user: identifier.type == AuthenticationIdentifierTypes.userId ? username : null, - password: passwordController.text, + // #Pangea + // password: passwordController.text, + password: passwordController.text.trim(), + // Pangea# initialDeviceDisplayName: PlatformInfos.clientName, ); MatrixState.pangeaController.pStoreService