backport of commit 26bae559979bb6cc9f086d26f9c6450aa5173e95 (#23900)

Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
This commit is contained in:
hc-github-team-secure-vault-core 2023-10-30 11:47:45 -04:00 committed by GitHub
parent 519aad6fbd
commit f752283c08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

3
changelog/23802.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
core/mounts: Fix reading an "auth" mount using "sys/internal/ui/mounts/" when filter paths are enforced returns 500 error code from the secondary
```

View File

@ -4328,7 +4328,12 @@ func (b *SystemBackend) pathInternalUIMountRead(ctx context.Context, req *logica
return errResp, logical.ErrPermissionDenied
}
filtered, err := b.Core.checkReplicatedFiltering(ctx, me, "")
var routerPrefix string
if strings.HasPrefix(me.APIPathNoNamespace(), credentialRoutePrefix) {
routerPrefix = credentialRoutePrefix
}
filtered, err := b.Core.checkReplicatedFiltering(ctx, me, routerPrefix)
if err != nil {
return nil, err
}