Handle the case when the stored password is null, but the user tried to login with a password.

This commit is contained in:
aled 2020-06-11 14:24:50 +01:00
parent 762e0c8d17
commit c722ad22ec

View File

@ -61,6 +61,9 @@ namespace Emby.Server.Implementations.Library
});
}
// Handle the case when the stored password is null, but the user tried to login with a password
if (resolvedUser.Password != null)
{
byte[] passwordbytes = Encoding.UTF8.GetBytes(password);
PasswordHash readyHash = PasswordHash.Parse(resolvedUser.Password);
@ -81,6 +84,7 @@ namespace Emby.Server.Implementations.Library
{
throw new AuthenticationException($"Requested crypto method not available in provider: {readyHash.Id}");
}
}
if (!success)
{