mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
[VAULT-14990] Support retrieving kv secret paths with trailing spaces (#15188)
This commit is contained in:
3
changelog/15188.txt
Normal file
3
changelog/15188.txt
Normal file
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user