From 70d07b830df016c403ab3161b395a5cf1718123f Mon Sep 17 00:00:00 2001 From: Jxiced Date: Fri, 21 Feb 2025 21:19:20 +0000 Subject: [PATCH] Prevent whitespaces in username during wizard setup. --- Jellyfin.Server.Implementations/Users/UserManager.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index fba8923f89..91cf9c972f 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -176,6 +176,10 @@ namespace Jellyfin.Server.Implementations.Users /// public async Task UpdateUserAsync(User user) { + ArgumentNullException.ThrowIfNull(user); + + ThrowIfInvalidUsername(user.Username); + var dbContext = await _dbProvider.CreateDbContextAsync().ConfigureAwait(false); await using (dbContext.ConfigureAwait(false)) {