From ab6fa48172b26e0c42f3ba00b6a49098d7be90a7 Mon Sep 17 00:00:00 2001 From: Jon Welfringer <7365166+W6HBR@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:34:44 -0800 Subject: [PATCH] Fix #4885 - Pass userid as int to GetUser for JWT authentication --- Oqtane.Server/Infrastructure/Middleware/JwtMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/Infrastructure/Middleware/JwtMiddleware.cs b/Oqtane.Server/Infrastructure/Middleware/JwtMiddleware.cs index 071828d55..fc25a3f1b 100644 --- a/Oqtane.Server/Infrastructure/Middleware/JwtMiddleware.cs +++ b/Oqtane.Server/Infrastructure/Middleware/JwtMiddleware.cs @@ -59,7 +59,7 @@ public async Task Invoke(HttpContext context) if (userid != null && username != null) { var _users = context.RequestServices.GetService(typeof(IUserManager)) as IUserManager; - var user = _users.GetUser(userid, alias.SiteId); // cached + var user = _users.GetUser(int.Parse(userid), alias.SiteId); // cached if (user != null && !user.IsDeleted) { var claimsidentity = UserSecurity.CreateClaimsIdentity(alias, user);