mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Implemented suggested conditional
This commit is contained in:
parent
10f33b0273
commit
31ad366aa9
@ -379,7 +379,7 @@ namespace MediaBrowser.Api
|
||||
throw new ResourceNotFoundException("User not found");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(request.Password) || string.IsNullOrEmpty(request.Pw))
|
||||
if (!string.IsNullOrEmpty(request.Password) && string.IsNullOrEmpty(request.Pw))
|
||||
{
|
||||
throw new MethodNotAllowedException("Hashed-only passwords are not valid for this API.");
|
||||
}
|
||||
@ -387,7 +387,7 @@ namespace MediaBrowser.Api
|
||||
return Post(new AuthenticateUserByName
|
||||
{
|
||||
Username = user.Name,
|
||||
Password = request.Password,
|
||||
Password = null, // This should always be null
|
||||
Pw = request.Pw
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user