Skip to content

[stable31] fix(files): check that the source properly between storages - #66319

Merged
AndyScherzinger merged 3 commits into
stable31from
backport/66286/stable31
Nov 4, 2026
Merged

AndyScherzinger merged 3 commits into
stable31from
backport/66286/stable31

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Backport of #66286

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

…storages

`Local::moveFromStorage()`, the same-storage branch of
`Common::moveFromStorage()` and the same-bucket branch of
`ObjectStoreStorage::moveFromStorage()` resolve the jail of the source
storage and move the file on the underlying storage. This also skips any
`PermissionsMask` of the source, so a file could be moved out of a share
or mount without delete permissions.

Check `isDeletable()` on the source before taking any of these shortcuts,
like the generic copy-and-delete fallback already does.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-4RX49FAX.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
`Node::move()` only checked that the target folder accepts new files, but
never that the source may be moved away. Any caller passing it a node from
a share or mount without delete permissions could therefore move that
file out.

A rename within the same folder needs update permissions, or delete
permissions on the source and create permissions on the parent (the rules
of `DavUtil::canRename()` on newer versions). A move into another folder
requires the source to be deletable unless it is the root of a movable
mount.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-4RX49FAX.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Add integration tests that renaming a live photo still renames its peer,
and that a peer in a share without delete permission is not moved out of
the share. The move step now also records server errors, as an aborted
live photo rename answers with a 500.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-4RX49FAX.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux force-pushed the backport/66286/stable31 branch from e3c79b6 to e010a95 Compare November 4, 2026 16:42
@susnux
susnux marked this pull request as ready for review November 4, 2026 16:43
@AndyScherzinger
AndyScherzinger merged commit d339d44 into stable31 Nov 4, 2026
197 of 208 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/66286/stable31 branch November 4, 2026 21:47
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for more than 7 days. As we do not monitor merged or closed pull requests, we are locking this pull request to prevent further comments from getting lost in the noise.
If you discovered any issues with this pull request, please open a new issue instead. In case you want to discuss this pull request or have further questions, please use our forum: https://help.nextcloud.com

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants