diff --git a/api/secrets/secrets.go b/api/secrets/secrets.go index ff6f690..13faa3f 100644 --- a/api/secrets/secrets.go +++ b/api/secrets/secrets.go @@ -61,8 +61,8 @@ func (secretObj *SecretObj) GetSecretFlow(secretsToRetrieve []string, separator for _, secretToRetrieve := range secretsToRetrieve { secretData := strings.Split(secretToRetrieve, separator) - secretPath := secretData[0] - secretTitle := secretData[1] + secretTitle := secretData[len(secretData)-1] + secretPath := strings.Join(secretData[:len(secretData)-1], separator) secret, err := secretObj.SecretGetSecretByPath(secretPath, secretTitle, separator, "secrets-safe/secrets") diff --git a/api/utils/validator.go b/api/utils/validator.go index adbdadf..4e99e0c 100644 --- a/api/utils/validator.go +++ b/api/utils/validator.go @@ -133,8 +133,9 @@ func ValidatePaths(secretPaths []string, isManagedAccount bool, separator string secretData := strings.Split(secretToRetrieve, separator) - path := secretData[0] - name := secretData[1] + name := secretData[len(secretData)-1] + path := strings.Join(secretData[:len(secretData)-1], separator) + maxPath := maxPathLength maxName := maxTitleLength invalidPathName := "path"