diff --git a/go.mod b/go.mod index 2f5910895..48a043166 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,7 @@ require ( github.com/open-policy-agent/opa v1.10.1 github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 - github.com/opencloud-eu/reva/v2 v2.40.2 + github.com/opencloud-eu/reva/v2 v2.40.3 github.com/opensearch-project/opensearch-go/v4 v4.5.0 github.com/orcaman/concurrent-map v1.0.0 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index ca9ae61be..ca134b581 100644 --- a/go.sum +++ b/go.sum @@ -963,8 +963,8 @@ github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9 h1:dIft github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9/go.mod h1:JWyDC6H+5oZRdUJUgKuaye+8Ph5hEs6HVzVoPKzWSGI= github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 h1:vD/EdfDUrv4omSFjrinT8Mvf+8D7f9g4vgQ2oiDrVUI= github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q= -github.com/opencloud-eu/reva/v2 v2.40.2 h1:rsgOkwA6MwReuwu7RvhWh675PJEQhLWrTOew5OSpR/E= -github.com/opencloud-eu/reva/v2 v2.40.2/go.mod h1:DGH08n2mvtsQLkt8o15FV6m51FwSJJGhjR8Ty+iIJww= +github.com/opencloud-eu/reva/v2 v2.40.3 h1:gFiBzI/Mq10zekZXvAXOGWRPzTjzHVhBt5W1B5JJMnE= +github.com/opencloud-eu/reva/v2 v2.40.3/go.mod h1:DGH08n2mvtsQLkt8o15FV6m51FwSJJGhjR8Ty+iIJww= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= diff --git a/vendor/github.com/opencloud-eu/reva/v2/internal/grpc/interceptors/auth/scope.go b/vendor/github.com/opencloud-eu/reva/v2/internal/grpc/interceptors/auth/scope.go index 7c0987094..f0a48a0a7 100644 --- a/vendor/github.com/opencloud-eu/reva/v2/internal/grpc/interceptors/auth/scope.go +++ b/vendor/github.com/opencloud-eu/reva/v2/internal/grpc/interceptors/auth/scope.go @@ -21,6 +21,7 @@ package auth import ( "context" "fmt" + "path/filepath" "strings" "time" @@ -298,8 +299,11 @@ func checkIfNestedResource(ctx context.Context, ref *provider.Reference, parent return false, statuspkg.NewErrorFromCode(pathResp.Status.Code, "auth interceptor") } childPath := pathResp.Path - - return strings.HasPrefix(childPath, parentPath), nil + rel, err := filepath.Rel(parentPath, childPath) + if err != nil { + return false, err + } + return !strings.HasPrefix(rel, ".."), nil } func extractRefFromListProvidersReq(v *registry.ListStorageProvidersRequest) (*provider.Reference, bool) { diff --git a/vendor/modules.txt b/vendor/modules.txt index cd619e896..ba74586c9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1370,7 +1370,7 @@ github.com/opencloud-eu/icap-client # github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 ## explicit; go 1.18 github.com/opencloud-eu/libre-graph-api-go -# github.com/opencloud-eu/reva/v2 v2.40.2 +# github.com/opencloud-eu/reva/v2 v2.40.3 ## explicit; go 1.24.1 github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace github.com/opencloud-eu/reva/v2/cmd/revad/runtime