mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
fixing a bug for cli when namespace is in both arg and path (#12911)
* fixing a bug for cli when namespace is in both arg and path * Add a changelog
This commit is contained in:
parent
1a70816b49
commit
080460d5fd
2 changed files with 5 additions and 2 deletions
3
changelog/12911.txt
Normal file
3
changelog/12911.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
cli: fixes CLI requests when namespace is both provided as argument and part of the path
|
||||
```
|
||||
|
|
@ -124,8 +124,8 @@ func addPrefixToVKVPath(p, mountPath, apiPrefix string) string {
|
|||
if len(partialMountPath) <= 1 || partialMountPath[1] == ""{
|
||||
break
|
||||
}
|
||||
mountPath = partialMountPath[1]
|
||||
tp = strings.TrimPrefix(p, mountPath)
|
||||
mountPath = strings.TrimSuffix(partialMountPath[1], "/")
|
||||
tp = strings.TrimPrefix(tp, mountPath)
|
||||
}
|
||||
|
||||
return path.Join(mountPath, apiPrefix, tp)
|
||||
|
|
|
|||
Loading…
Reference in a new issue