From 31ad366aa93e8bc07f6e120320f3abd27d9dfd49 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Thu, 18 Apr 2019 10:24:08 -0400 Subject: [PATCH] Implemented suggested conditional --- MediaBrowser.Api/UserService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs index 7628a2f0fa..497800d263 100644 --- a/MediaBrowser.Api/UserService.cs +++ b/MediaBrowser.Api/UserService.cs @@ -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 }); }