Force SHA1 hashing on updated hash files

This commit is contained in:
cake
2025-12-02 06:33:08 +01:00
parent 481bc99dcd
commit 72cd5006db
7 changed files with 214 additions and 74 deletions

View File

@@ -434,8 +434,10 @@ public partial class EditProfileUi
try
{
var fileContent = await File.ReadAllBytesAsync(filePath).ConfigureAwait(false);
await using var stream = new MemoryStream(fileContent);
var format = await Image.DetectFormatAsync(stream).ConfigureAwait(false);
var stream = new MemoryStream(fileContent);
await using (stream.ConfigureAwait(false))
{
var format = await Image.DetectFormatAsync(stream).ConfigureAwait(false);
if (!IsSupportedImageFormat(format))
{
_showProfileImageError = true;
@@ -461,6 +463,7 @@ public partial class EditProfileUi
_showProfileImageError = false;
_queuedProfileImage = fileContent;
Mediator.Publish(new ClearProfileGroupDataMessage(_groupInfo.Group));
}
}
catch (Exception ex)
{