From cc8a6df463837158a64077abaae4ad42e0d097c2 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Mon, 1 Jul 2024 21:37:32 -0500 Subject: [PATCH] remove md5 check for windows update script as content-md5 header no longer appears to be transmitted --- DeploymentFiles/UpdateIW4MAdmin.ps1 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/DeploymentFiles/UpdateIW4MAdmin.ps1 b/DeploymentFiles/UpdateIW4MAdmin.ps1 index b871f255..f211e968 100644 --- a/DeploymentFiles/UpdateIW4MAdmin.ps1 +++ b/DeploymentFiles/UpdateIW4MAdmin.ps1 @@ -61,8 +61,6 @@ if ($fileDownload.StatusDescription -ne "OK") throw "Could not update IW4MAdmin. ($fileDownload.StatusDescription)" } -$remoteHash = $fileDownload.Headers['Content-MD5'] -$decodedHash = [System.BitConverter]::ToString([System.Convert]::FromBase64String($remoteHash)).replace('-', '') $directoryPath = Get-Location $fullPath = "$directoryPath\$filename" $outputFile = [System.IO.File]::Open($fullPath, 2) @@ -88,13 +86,6 @@ finally $outputFile.Dispose() } -$localHash = (Get-FileHash -Path $fullPath -Algorithm MD5).Hash - -if ($localHash -ne $decodedHash) -{ - throw "Failed to update. File hashes don't match!" -} - Write-Output "Extracting $filename to $outputDir" Expand-Archive -Path $fullPath -DestinationPath $outputDir -Force