From 5fa545e9818779eb2a04a885127aa5fb54f2beae Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Wed, 25 Dec 2024 05:53:59 +0300 Subject: [PATCH] fix: trim the variable to avoid the effects of whitespace characters --- Security/Services/AuthService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Security/Services/AuthService.cs b/Security/Services/AuthService.cs index e78ce75..7909cc1 100644 --- a/Security/Services/AuthService.cs +++ b/Security/Services/AuthService.cs @@ -175,7 +175,7 @@ public class AuthService(ICacheService cache, IAccessToken accessTokenService, I public async Task LoginAsync(CookieOptionsParameters cookieOptions, User user, HttpContext context, string password, string username, CancellationToken cancellation = default) { var requestContext = new RequestContextInfo(context, cookieOptions); - + username = username.Trim(); await VerifyUserOrThrowError(requestContext, user, password, username, cancellation); if (user.TwoFactorAuthenticator == TwoFactorAuthenticator.None)