소스 검색

Implemented suggested conditional

Joshua Boniface 6 년 전
부모
커밋
31ad366aa9
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      MediaBrowser.Api/UserService.cs

+ 2 - 2
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
             });
         }