From 7fc553a3a7367708d5d20335fd153589c60d3c35 Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Tue, 15 Jun 2021 09:24:54 +0530 Subject: [PATCH] rbd: removing TrimSpace from validateImageFeatures func `imageFeatures` string containing just whitespace should also be treated as a invalid feature. Signed-off-by: Rakshith R --- internal/rbd/rbd_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index 60f52c59e..ad590f606 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -1017,7 +1017,7 @@ func (rv *rbdVolume) validateImageFeatures(imageFeatures string) error { // the Go split function would return a single item array with // an empty string, causing a failure when trying to validate // the features. - if strings.TrimSpace(imageFeatures) == "" { + if imageFeatures == "" { return nil } arr := strings.Split(imageFeatures, ",")