diff options
| author | Peter Maar <alset333@icloud.com> | 2020-03-19 22:02:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-19 22:02:08 -0400 |
| commit | adbf375efe44a5866a277ff2d7720c0ced6597b2 (patch) | |
| tree | e89e50745ed8288b7bbd388018ed7669e449fee9 /Emby.Server.Implementations/Library/UserManager.cs | |
| parent | 818695a01e007ce507d4518aefc520870989964d (diff) | |
| parent | af5d3e8eaeea6cd1c2e9248352a2e728d27b3c22 (diff) | |
Merge pull request #1 from jellyfin/master
Pull latest to my fork
Diffstat (limited to 'Emby.Server.Implementations/Library/UserManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 656eeb145..25d733a65 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -1,5 +1,4 @@ #pragma warning disable CS1591 -#pragma warning disable SA1600 using System; using System.Collections.Concurrent; @@ -291,10 +290,11 @@ namespace Emby.Server.Implementations.Library && authenticationProvider != null && !(authenticationProvider is DefaultAuthenticationProvider)) { - // We should trust the user that the authprovider says, not what was typed + // Trust the username returned by the authentication provider username = updatedUsername; - // Search the database for the user again; the authprovider might have created it + // Search the database for the user again + // the authentication provider might have created it user = Users .FirstOrDefault(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase)); @@ -667,7 +667,7 @@ namespace Emby.Server.Implementations.Library throw new ArgumentException("Invalid username", nameof(newName)); } - if (user.Name.Equals(newName, StringComparison.OrdinalIgnoreCase)) + if (user.Name.Equals(newName, StringComparison.Ordinal)) { throw new ArgumentException("The new and old names must be different."); } |
