[VAULT-14990] Support retrieving kv secret paths with trailing spaces (#15188)
This commit is contained in:
parent
15a9b32a58
commit
ba88b1da16
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
cli: kv get command now honors trailing spaces to retrieve secrets
|
||||
```
|
|
@ -124,7 +124,8 @@ func (c *KVGetCommand) Run(args []string) int {
|
|||
// Parse the paths and grab the KV version
|
||||
if mountFlagSyntax {
|
||||
// In this case, this arg is the secret path (e.g. "foo").
|
||||
partialPath = sanitizePath(args[0])
|
||||
partialPath = args[0]
|
||||
|
||||
mountPath = sanitizePath(c.flagMount)
|
||||
_, v2, err = isKVv2(mountPath, client)
|
||||
if err != nil {
|
||||
|
@ -134,7 +135,8 @@ func (c *KVGetCommand) Run(args []string) int {
|
|||
} else {
|
||||
// In this case, this arg is a path-like combination of mountPath/secretPath.
|
||||
// (e.g. "secret/foo")
|
||||
partialPath = sanitizePath(args[0])
|
||||
partialPath = args[0]
|
||||
|
||||
mountPath, v2, err = isKVv2(partialPath, client)
|
||||
if err != nil {
|
||||
c.UI.Error(err.Error())
|
||||
|
|
Loading…
Reference in New Issue