diff options
| author | Aaron Madsen <amadsen@codifiant.com> | 2025-05-03 16:10:10 -0700 |
|---|---|---|
| committer | Chris Lu <chrislusf@users.noreply.github.com> | 2025-05-04 05:23:16 -0700 |
| commit | d8c22dfd98b9aa8a463cd5d6dffc2ea750dfcdf2 (patch) | |
| tree | e0c543adbb87eccd12705fdb33d3f6d796ebc04f /pkg/driver/controllerserver.go | |
| parent | d22a187d747f443c6671d8f9ab076c4985dd82a2 (diff) | |
| download | seaweedfs-csi-driver-d8c22dfd98b9aa8a463cd5d6dffc2ea750dfcdf2.tar.xz seaweedfs-csi-driver-d8c22dfd98b9aa8a463cd5d6dffc2ea750dfcdf2.zip | |
Use only lowercase letters in the volume ID to avoid case matching issues
Diffstat (limited to 'pkg/driver/controllerserver.go')
| -rw-r--r-- | pkg/driver/controllerserver.go | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
