Truncate password reset file on open for writing (#14948)

This commit is contained in:
Bond-009 2025-10-05 19:24:12 +02:00 committed by GitHub
parent 288640a5d0
commit d3d5915f31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ namespace Jellyfin.Server.Implementations.Users
UserName = user.Username
};
FileStream fileStream = AsyncFile.OpenWrite(filePath);
FileStream fileStream = AsyncFile.Create(filePath);
await using (fileStream.ConfigureAwait(false))
{
await JsonSerializer.SerializeAsync(fileStream, spr).ConfigureAwait(false);