The Free Software Media System - Server Backend & API
Remove the hashed password from startup users response (#13904)
Bill Thorntonafdde7b2439e
diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.csindex 2278468d9f..09f20558fe 100644--- a/Jellyfin.Api/Controllers/StartupController.cs+++ b/Jellyfin.Api/Controllers/StartupController.cs@@ -114,8 +114,7 @@ public class StartupController : BaseJellyfinApiControllervar user = _userManager.Users.First();return new StartupUserDto{- Name = user.Username,- Password = user.Password+ Name = user.Username};}diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.csindex 36ba6c7e35..c8ae2a88af 100644--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/StartupControllerTests.cs@@ -90,9 +90,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllersvar 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]