From 1786e47806bf4979edd5cbc1c497e41fdde3c557 Mon Sep 17 00:00:00 2001 From: Matt Artist Date: Sat, 11 Mar 2023 13:21:21 -0500 Subject: [PATCH] fix: convert download hashes to lower before compare (#199) --- core/download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/download.go b/core/download.go index d176719..c71301a 100644 --- a/core/download.go +++ b/core/download.go @@ -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)