From 60cc2cba1f2a9825aab81abc3ca9009f3e66b23b Mon Sep 17 00:00:00 2001 From: buengese Date: Tue, 22 Sep 2020 03:15:09 +0200 Subject: [PATCH] sftp: always convert the checksum to lower case - fixes #4518 --- backend/sftp/sftp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go index 4ab8ce4b0..c0cb928f5 100644 --- a/backend/sftp/sftp.go +++ b/backend/sftp/sftp.go @@ -1087,7 +1087,7 @@ func shellEscape(str string) string { func parseHash(bytes []byte) string { // For strings with backslash *sum writes a leading \ // https://unix.stackexchange.com/q/313733/94054 - return strings.Split(strings.TrimLeft(string(bytes), "\\"), " ")[0] // Split at hash / filename separator + return strings.ToLower(strings.Split(strings.TrimLeft(string(bytes), "\\"), " ")[0]) // Split at hash / filename separator / all convert to lowercase } // Parses the byte array output from the SSH session