From d8c22dfd98b9aa8a463cd5d6dffc2ea750dfcdf2 Mon Sep 17 00:00:00 2001 From: Aaron Madsen Date: Sat, 3 May 2025 16:10:10 -0700 Subject: Use only lowercase letters in the volume ID to avoid case matching issues --- pkg/driver/controllerserver.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg') diff --git a/pkg/driver/controllerserver.go b/pkg/driver/controllerserver.go index 03d5920..3a2d9fc 100644 --- a/pkg/driver/controllerserver.go +++ b/pkg/driver/controllerserver.go @@ -211,6 +211,8 @@ func sanitizeVolumeId(volumeId string) string { io.WriteString(h, volumeId) // hexidecimal encoding of sha1 is 40 characters long hexhash := hex.EncodeToString(h.Sum(nil)) + // Use only lowercase letters + volumeId = strings.ToLower(volumeId) sanitized := unsafeVolumeIdChars.ReplaceAllString(volumeId, "-") // 21 here is 62 - 40 characters for the hash - 1 more for the "-" we use join // the sanitized ID to the hash -- cgit v1.2.3