mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-17 16:51:45 +01:00
Fix remount tests (#10265)
This commit is contained in:
parent
363b546a1e
commit
07847db961
@ -1018,7 +1018,12 @@ func (b *SystemBackend) handleUnmount(ctx context.Context, req *logical.Request,
|
||||
}
|
||||
|
||||
func validateMountPath(p string) error {
|
||||
hasSuffix := strings.HasSuffix(p, "/")
|
||||
s := path.Clean(p)
|
||||
// Retain the trailing slash if it was provided
|
||||
if hasSuffix {
|
||||
s = s + "/"
|
||||
}
|
||||
if p != s {
|
||||
return fmt.Errorf("path '%v' does not match cleaned path '%v'", p, s)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user