소스 검색

Remove the hashed password from startup users response (#13904)

Bill Thornton 2 달 전
부모
커밋
afdde7b243
2개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 2
      Jellyfin.Api/Controllers/StartupController.cs
  2. 1 3
      tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs

+ 1 - 2
Jellyfin.Api/Controllers/StartupController.cs

@@ -114,8 +114,7 @@ public class StartupController : BaseJellyfinApiController
         var user = _userManager.Users.First();
         return new StartupUserDto
         {
-            Name = user.Username,
-            Password = user.Password
+            Name = user.Username
         };
     }
 

+ 1 - 3
tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs

@@ -90,9 +90,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
             var newUser = await getResponse.Content.ReadFromJsonAsync<StartupUserDto>(_jsonOptions);
             Assert.NotNull(newUser);
             Assert.Equal(user.Name, newUser.Name);
-            Assert.NotNull(newUser.Password);
-            Assert.NotEmpty(newUser.Password);
-            Assert.NotEqual(user.Password, newUser.Password);
+            Assert.Null(newUser.Password);
         }
 
         [Fact]