Skip to content

Fix federated reshares#58689

Open
provokateurin wants to merge 2 commits intomasterfrom
fix/federated-reshare
Open

Fix federated reshares#58689
provokateurin wants to merge 2 commits intomasterfrom
fix/federated-reshare

Conversation

@provokateurin
Copy link
Member

The following sharing chain didn't work before:

  1. User A from instances A creates public share link
  2. User B from instance B uses the "Add to your Nextcloud" feature
  3. User B from instance B creates a public share link
  4. User C from instance C uses the "Add to your Nextcloud" feature

Without these fixes step 4 fails:

$this->federatedShareProvider->create($share);
causes $share->setId($shareId); to be called on a share that already has an id set, which fails because it's not allowed. The share from user A to user B is also removed due to bad error handling after the exception.

I'm afraid the PublicOwnerWrapper is broken as well, because the code doesn't consider that the owner might be a user from a different instance, but I'm not sure if that can be fixed at all without huge changes. Maybe this scenario could be detected and the initiator could be used as a replacement, but that could also have other unintended side effects.

@provokateurin provokateurin added this to the Nextcloud 34 milestone Mar 3, 2026
@provokateurin provokateurin requested a review from a team as a code owner March 3, 2026 14:34
@provokateurin provokateurin added bug 3. to review Waiting for reviews labels Mar 3, 2026
@provokateurin provokateurin requested review from Altahrim, come-nc, leftybournes and salmart-dev and removed request for a team March 3, 2026 14:34
Signed-off-by: provokateurin <kate@provokateurin.de>
…r might on another server

Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin provokateurin force-pushed the fix/federated-reshare branch from dd38de7 to d999e97 Compare March 4, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant