diff options
| author | Jxiced <mangonation420@gmail.com> | 2025-02-21 21:19:20 +0000 |
|---|---|---|
| committer | Jxiced <mangonation420@gmail.com> | 2025-02-21 21:19:20 +0000 |
| commit | 70d07b830df016c403ab3161b395a5cf1718123f (patch) | |
| tree | 28fcaa044e1a2c4719eb3874e1ec6693a18dfa60 /Jellyfin.Server.Implementations/Users | |
| parent | a9f84b92df701ad279bd9a183f0d205e66bf262f (diff) | |
Prevent whitespaces in username during wizard setup.
Diffstat (limited to 'Jellyfin.Server.Implementations/Users')
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/UserManager.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index fba8923f8..91cf9c972 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -176,6 +176,10 @@ namespace Jellyfin.Server.Implementations.Users /// <inheritdoc/> public async Task UpdateUserAsync(User user) { + ArgumentNullException.ThrowIfNull(user); + + ThrowIfInvalidUsername(user.Username); + var dbContext = await _dbProvider.CreateDbContextAsync().ConfigureAwait(false); await using (dbContext.ConfigureAwait(false)) { |
