mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Return MethodNotAllowedException if Pw is not set
Don't accept pre-hashed (not-plaintext) passwords as the auth provider no longer supports this due to sha1+salting the passwords in the database.
This commit is contained in:
parent
250e0c75df
commit
e790f024c2
@ -379,6 +379,11 @@ namespace MediaBrowser.Api
|
|||||||
throw new ResourceNotFoundException("User not found");
|
throw new ResourceNotFoundException("User not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!request.Pw)
|
||||||
|
{
|
||||||
|
throw new MethodNotAllowedException("Hashed-only passwords are not valid for this API.");
|
||||||
|
}
|
||||||
|
|
||||||
return Post(new AuthenticateUserByName
|
return Post(new AuthenticateUserByName
|
||||||
{
|
{
|
||||||
Username = user.Name,
|
Username = user.Name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user