fix: convert download hashes to lower before compare (#199)

This commit is contained in:
Matt Artist 2023-03-11 13:21:21 -05:00 committed by GitHub
parent abf701560d
commit 1786e47806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,7 +268,7 @@ func teeHashes(hashesToObtain []string, hashes map[string]string,
calculatedHash := mainHasher.HashToString(mainHasher.Sum(nil))
// Check if the hash of the downloaded file matches the expected hash
if calculatedHash != validateHash {
if strings.ToLower(calculatedHash) != strings.ToLower(validateHash) {
return fmt.Errorf(
"%s hash of downloaded file does not match with expected hash!\n download hash: %s\n expected hash: %s\n",
validateHashFormat, calculatedHash, validateHash)