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

This commit is contained in:
Bill Thornton 2025-04-12 09:12:33 -04:00 committed by GitHub
parent 5020c09640
commit afdde7b243
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View File

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

View File

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