Repository navigation
fix(publicshareprovider): [OCISDEV-1383] enforce authz on public link type change - #796
Merged
LukasHirt merged 2 commits intoNov 12, 2026
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-stable-8.0
branch
from
November 5, 2026 09:57
9809ce0 to
1a1911f
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. |
…he permission gRPC call Signed-off-by: Lukas Hirt <[email protected]> (cherry picked from commit 57b34aa) Signed-off-by: Lukas Hirt <[email protected]>
Author
|
PR to main merged. |
2403905
approved these changes
Nov 12, 2026
mzner
approved these changes
Nov 12, 2026
LukasHirt
deleted the
fix/ocisdev-1383-public-link-type-change-authz-stable-8.0
branch
November 12, 2026 09:11
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#796) comes in with the reva re-pin in #13446. Signed-off-by: Lukas Hirt <[email protected]>
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 16, 2026
…e manager Bump reva to v2.0.0-20261112224757-ebbb52833e5f, the head of owncloud/reva#813. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva: - removes stale group shares from the group cache, only when it read the share file of the space - does not upload a file when a Remove changes nothing - writes a share before the grantee entry, and rolls back after a failure - removes the share in an unshare also when the grantee entry fails - removes many shares with one upload for each document - logs the share cleanup errors after a space delete The bump also brings owncloud/reva#796 into stable-8.0. The previous reva pin did not have it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 16, 2026
…e manager Bump reva to v2.0.0-20261112224757-ebbb52833e5f, the head of owncloud/reva#813. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva: - removes stale group shares from the group cache, only when it read the share file of the space - does not upload a file when a Remove changes nothing - writes a share before the grantee entry, and rolls back after a failure - removes the share in an unshare also when the grantee entry fails - removes many shares with one upload for each document - logs the share cleanup errors after a space delete The bump also brings owncloud/reva#796 into stable-8.0. The previous reva pin did not have it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
2403905
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 17, 2026
…e manager Bump reva to v2.0.0-20261112224757-ebbb52833e5f, the head of owncloud/reva#813. A stale group share is a share ID in the group cache that has no share. On each listing of the received shares, the jsoncs3 share manager uploaded the received.json file of the user again with the same content, and the stale ID stayed. The new reva: - removes stale group shares from the group cache, only when it read the share file of the space - does not upload a file when a Remove changes nothing - writes a share before the grantee entry, and rolls back after a failure - removes the share in an unshare also when the grantee entry fails - removes many shares with one upload for each document - logs the share cleanup errors after a space delete The bump also brings owncloud/reva#796 into stable-8.0. The previous reva pin did not have it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
LukasHirt
added a commit
to owncloud/ocis
that referenced
this pull request
Nov 18, 2026
…when updating links The reva fix (owncloud/reva#796) comes in with the reva re-pin in #13446. 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.
Backport of #794 to stable-8.0.
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 now requires the user
to be permitted 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 even when the user had no
resharing permission on the resource.
Changes
UpdatePublicShare: on an internal → public (non-internal) type change, applythe
WritePublicLinkand resharing (AddGrant) checks, without exempting theshare creator.
Note on this backport
stable-8.0 has no
enable_public_sharingtoggle (it was introduced later), so thepublic-sharing-enabled gate that is part of the fix on
main/stable-9.0isomitted here; the resharing-authority enforcement applies as above.
Tests
go test ./internal/grpc/services/publicshareprovider/passes.