diff options
| author | artiume <siderite@gmail.com> | 2020-02-04 06:02:38 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-04 06:02:38 -0500 |
| commit | 3b6a4c3a33956eb54a0168f461b0279c4d3c1719 (patch) | |
| tree | 745336d36a86e689d06250f8867d809a937d24aa /Emby.Server.Implementations/Library/UserManager.cs | |
| parent | d4470b5709eaddae12c0096634bd47d7f9ec0b97 (diff) | |
| parent | 176e8509739ffd3d7002c94adbd814c33b5172e2 (diff) | |
Merge pull request #11 from jellyfin/master
nightly
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."); } |
