Repository navigation
fix(publicshareprovider): [OCISDEV-1383] enforce authz on public link type change - #794
Merged
Merged
Conversation
… type change Promoting an internal link (empty permissions) to a non-internal public link is equivalent to creating a public link, but UpdatePublicShare did not re-apply the public-link authorization checks and exempted the link creator from them. Apply the same checks as CreatePublicShare on an internal-to-public type change (public-sharing enabled, write-public-link permission, resharing permission), without exempting the creator. Signed-off-by: Lukas Hirt <[email protected]>
LukasHirt
force-pushed
the
fix/ocisdev-1383-public-link-type-change-authz
branch
from
November 5, 2026 09:53
0f21b05 to
f0b74c2
Compare
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This was referenced Nov 5, 2026
jvillafanez
reviewed
Nov 5, 2026
…he permission gRPC call Signed-off-by: Lukas Hirt <[email protected]>
jvillafanez
approved these changes
Nov 9, 2026
5 tasks
LukasHirt
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 12, 2026
…when updating links The reva fix (owncloud/reva#794) is already vendored on master through an earlier reva bump. Signed-off-by: Lukas Hirt <[email protected]>
LukasHirt
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 12, 2026
…when updating links (#13441) The reva fix (owncloud/reva#794) is already vendored on master through an earlier reva bump. Signed-off-by: Lukas Hirt <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changing a share link's type is now subject to the same authorization checks as
creating a link. Raising an internal link to a public link is only permitted when
public sharing is enabled and the user is allowed to create public links and to
reshare the resource.
Previously
UpdatePublicSharedid not re-apply the public-link authorizationchecks on a link type change and exempted the link creator from them, so an
internal link could be turned into a public link in configurations where creating
one directly is not permitted.
Changes
UpdatePublicShare: on an internal → public (non-internal) type change, applythe same gates as
CreatePublicShare— public sharing enabled,WritePublicLinkpermission, and resharing (
AddGrant) permission — without exempting the sharecreator.
Tests
go test ./internal/grpc/services/publicshareprovider/passes.