diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-04-20 12:25:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-20 12:25:29 +0200 |
| commit | a8da122fb3c9c1f66f43da01099fb6aa86d554c6 (patch) | |
| tree | 12fbf29535844df988492d06420beadab0ac190c /MediaBrowser.Api/UserService.cs | |
| parent | 7bea62adbfc7350c01a222cb92c86c13c0b43412 (diff) | |
| parent | 46c37c0ae8d5b5de02ff6f8208a7b91436f54237 (diff) | |
Merge pull request #1252 from jellyfin/release-10.3.z
Backmerge release 10.3.0
Diffstat (limited to 'MediaBrowser.Api/UserService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserService.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs index a6849f75f..497800d26 100644 --- a/MediaBrowser.Api/UserService.cs +++ b/MediaBrowser.Api/UserService.cs @@ -379,10 +379,15 @@ namespace MediaBrowser.Api throw new ResourceNotFoundException("User not found"); } + if (!string.IsNullOrEmpty(request.Password) && string.IsNullOrEmpty(request.Pw)) + { + throw new MethodNotAllowedException("Hashed-only passwords are not valid for this API."); + } + return Post(new AuthenticateUserByName { Username = user.Name, - Password = request.Password, + Password = null, // This should always be null Pw = request.Pw }); } |
