Skip to content

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

Merged
AndyScherzinger merged 3 commits into
stable34from
backport/66286/stable34
Nov 4, 2026
Merged

AndyScherzinger merged 3 commits into
stable34from
backport/66286/stable34

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>
@backportbot backportbot Bot added bug 3. to review Waiting for reviews AI assisted labels Nov 4, 2026
@backportbot backportbot Bot added this to the Nextcloud 34.0.6 milestone Nov 4, 2026
`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.

Apply the same checks as WebDAV (`FilesPlugin::checkMove()`): a rename
within the same folder follows `DavUtil::canRename()`, 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/stable34 branch from 4bca7be to ad45c28 Compare November 4, 2026 16:42
@susnux
susnux marked this pull request as ready for review November 4, 2026 16:42
@susnux
susnux requested a review from a team as a code owner November 4, 2026 16:42
@susnux
susnux requested review from icewind1991 and provokateurin and removed request for a team November 4, 2026 16:42
@AndyScherzinger
AndyScherzinger merged commit a40a128 into stable34 Nov 4, 2026
224 of 239 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/66286/stable34 branch November 4, 2026 20:39
@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