diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2020-02-03 13:51:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-03 13:51:34 +0100 |
| commit | 241e351a6128aeaf594e8fefe2da244970c24954 (patch) | |
| tree | 6f8957265ebb56eee8a4bbdf81df624cd3a6302d /Emby.Server.Implementations/Library/UserManager.cs | |
| parent | d69870680b9a12118b2e5b5e9944c91b886a12c9 (diff) | |
| parent | b7a9900556d2fb316f0ea9d96e561bebb5332257 (diff) | |
Merge branch 'master' into dlnawarnings
Diffstat (limited to 'Emby.Server.Implementations/Library/UserManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserManager.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 656eeb145..6e203f894 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -291,10 +291,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 +668,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."); } |
