From 012461aa0d26a20c394638afd6d08311888c69ca Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Fri, 1 Nov 2024 16:52:38 +0100 Subject: [PATCH 1/2] public links: return error when owner could not be resolved --- pkg/auth/manager/publicshares/publicshares.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/auth/manager/publicshares/publicshares.go b/pkg/auth/manager/publicshares/publicshares.go index 3739999d98..05eabc47f1 100644 --- a/pkg/auth/manager/publicshares/publicshares.go +++ b/pkg/auth/manager/publicshares/publicshares.go @@ -128,6 +128,9 @@ func (m *manager) Authenticate(ctx context.Context, token, secret string) (*user if err != nil { return nil, nil, err } + if getUserResponse.Status.Code != rpcv1beta1.Code_CODE_OK { + return nil, nil, errtypes.NotFound(getUserResponse.Status.Message) + } share := publicShareResponse.GetShare() role := authpb.Role_ROLE_VIEWER From 742d6069a65d11c9f8756a56e5bb76dbdf2d8a60 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Fri, 1 Nov 2024 16:59:11 +0100 Subject: [PATCH 2/2] changelog --- changelog/unreleased/publink-fix.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/unreleased/publink-fix.md diff --git a/changelog/unreleased/publink-fix.md b/changelog/unreleased/publink-fix.md new file mode 100644 index 0000000000..6d626bd4fc --- /dev/null +++ b/changelog/unreleased/publink-fix.md @@ -0,0 +1,3 @@ +Bugfix: public links: return error when owner could not be resolved + +https://github.com/cs3org/reva/pull/4907