sftp: always convert the checksum to lower case - fixes #4518

This commit is contained in:
buengese 2020-09-22 03:15:09 +02:00
parent c797494d88
commit 60cc2cba1f

View File

@ -1087,7 +1087,7 @@ func shellEscape(str string) string {
func parseHash(bytes []byte) string { func parseHash(bytes []byte) string {
// For strings with backslash *sum writes a leading \ // For strings with backslash *sum writes a leading \
// https://unix.stackexchange.com/q/313733/94054 // 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 // Parses the byte array output from the SSH session