diff options
| author | Phallacy <Dragoonmac@gmail.com> | 2019-02-12 22:30:26 -0800 |
|---|---|---|
| committer | Phallacy <Dragoonmac@gmail.com> | 2019-02-12 22:30:26 -0800 |
| commit | 1ffd443d5aaec408170eaec31923a1cbbe1bb929 (patch) | |
| tree | c478acd4178858e6dc772ea974243b89121becb1 /Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs | |
| parent | 1dc5a624a7b735fe872110a2a56529560381abf0 (diff) | |
fixed nul user check to be first per justaman
Diffstat (limited to 'Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs b/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs index 92346c65a..255fd8252 100644 --- a/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs +++ b/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs @@ -32,15 +32,16 @@ namespace Emby.Server.Implementations.Library //This is the verson that we need to use for local users. Because reasons. public Task<ProviderAuthenticationResult> Authenticate(string username, string password, User resolvedUser)
- {
- ConvertPasswordFormat(resolvedUser);
- byte[] passwordbytes = Encoding.UTF8.GetBytes(password);
- bool success = false;
+ { + bool success = false; if (resolvedUser == null)
{
success = false;
throw new Exception("Invalid username or password");
}
+ ConvertPasswordFormat(resolvedUser);
+ byte[] passwordbytes = Encoding.UTF8.GetBytes(password);
+
if (!resolvedUser.Password.Contains("$"))
{
ConvertPasswordFormat(resolvedUser);
|
