Skip to content

fix(federation): resolve federated storage for local reshares - #6249

Open
ArtificialOwl wants to merge 1 commit into
mainfrom
fix/noid/extract-owner-from-local-share
Open

ArtificialOwl wants to merge 1 commit into
mainfrom
fix/noid/extract-owner-from-local-share

Conversation

@ArtificialOwl

@ArtificialOwl ArtificialOwl commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

When a file received through a federated share is reshared locally, the recipient's copy sits on a shared storage that wraps the federated one. FederationService::getRemoteRedirectURL() detected that storage as federated, but read the remote server, the share token and the file path from the recipient's wrapping storage. For a single reshared file that path is empty, so the remote server opened the root of the federated share instead of the file.

Permissions still come from the recipient's own copy. The access token sent to the remote server takes its write flag from that copy, and the remote server removes edit rights when the flag is off, so a read-only local reshare stays read-only.

Other changes:

  • getRemoteRedirectURL() now declares a ?string return type.
  • The Psalm baseline is updated for the new SharingExternalStorage reference.

TODO

  • Test end to end: share a file from instance A to B, reshare it locally on B (read-only and editable), and open it on B

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🤖 Generated with Claude Code

Signed-off-by: Maxence Lange <[email protected]>
Assisted-by: ClaudeCode:claude-opus-5-5
@ArtificialOwl
ArtificialOwl force-pushed the fix/noid/extract-owner-from-local-share branch from 9ae9cec to 8297fa9 Compare October 29, 2026 19:32
@ArtificialOwl ArtificialOwl changed the title fix(federation): get owner from local share fix(federation): resolve federated storage for local reshares Oct 29, 2026
@ArtificialOwl
ArtificialOwl marked this pull request as ready for review October 29, 2026 19:40
@ArtificialOwl ArtificialOwl added the 3. to review Ready to be reviewed label Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant