mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-04 20:06:27 +02: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
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…
x
Reference in New Issue
Block a user