diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-10-13 10:45:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-13 10:45:15 +0200 |
| commit | 4fc27fa63eb5a88a1a67a7ba67e969468f79a48d (patch) | |
| tree | 3275848551b4a2c5a844bdbd2d14f0697637b79e /Emby.Server.Implementations/Updates/InstallationManager.cs | |
| parent | 5277339982f57c6e882db3313ee302667cce2ffb (diff) | |
| parent | d7748cfa0476280cce9dba34b4512cc58760c8bb (diff) | |
Merge pull request #10390 from Bond-009/streams
Diffstat (limited to 'Emby.Server.Implementations/Updates/InstallationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Updates/InstallationManager.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 77d385ba1..c717744b1 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -520,10 +520,9 @@ namespace Emby.Server.Implementations.Updates // CA5351: Do Not Use Broken Cryptographic Algorithms #pragma warning disable CA5351 - using var md5 = MD5.Create(); cancellationToken.ThrowIfCancellationRequested(); - var hash = Convert.ToHexString(md5.ComputeHash(stream)); + var hash = Convert.ToHexString(await MD5.HashDataAsync(stream, cancellationToken).ConfigureAwait(false)); if (!string.Equals(package.Checksum, hash, StringComparison.OrdinalIgnoreCase)) { _logger.LogError( @@ -556,7 +555,7 @@ namespace Emby.Server.Implementations.Updates reader.ExtractToDirectory(targetDir, true); // Ensure we create one or populate existing ones with missing data. - await _pluginManager.PopulateManifest(package.PackageInfo, package.Version, targetDir, status); + await _pluginManager.PopulateManifest(package.PackageInfo, package.Version, targetDir, status).ConfigureAwait(false); _pluginManager.ImportPluginFrom(targetDir); } |
