From 214d2f23301a94af669054084208d8a99e21f691 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Mon, 15 Apr 2024 18:04:02 +0200 Subject: [PATCH] wip: Fix nested resource check for publicly shared space root --- internal/grpc/interceptors/auth/scope.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/grpc/interceptors/auth/scope.go b/internal/grpc/interceptors/auth/scope.go index 1b5edd9f206..ccb8de9e023 100644 --- a/internal/grpc/interceptors/auth/scope.go +++ b/internal/grpc/interceptors/auth/scope.go @@ -265,6 +265,9 @@ func checkIfNestedResource(ctx context.Context, ref *provider.Reference, parent return false, statuspkg.NewErrorFromCode(statResponse.Status.Code, "auth interceptor") } parentPath := statResponse.Info.Path + if utils.IsSpaceRoot(statResponse.Info) && parentPath == "." { + parentPath = "/" + } childPath := ref.GetPath() if childPath != "" && childPath != "." && strings.HasPrefix(childPath, parentPath) {