Skip to content

[stable35] fix(files_sharing): normalize share target on parent folder rename - #64122

Open
backportbot[bot] wants to merge 4 commits into
stable35from
backport/63956/stable35
Open

[stable35] fix(files_sharing): normalize share target on parent folder rename#64122
backportbot[bot] wants to merge 4 commits into
stable35from
backport/63956/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 8, 2026

Copy link
Copy Markdown

Backport of #63956

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.

@backportbot backportbot Bot added bug 3. to review Waiting for reviews AI assisted labels Sep 8, 2026
@backportbot backportbot Bot added this to the Nextcloud 35.0.1 milestone Sep 8, 2026
@silverkszlo
silverkszlo marked this pull request as ready for review September 8, 2026 14:06
@silverkszlo
silverkszlo requested a review from a team as a code owner September 8, 2026 14:06
@silverkszlo
silverkszlo requested review from Altahrim, CarlSchwan and leftybournes and removed request for a team September 8, 2026 14:06
@silverkszlo

Copy link
Copy Markdown
Contributor

/backport to stable34 please

@silverkszlo

Copy link
Copy Markdown
Contributor

/backport to stable33 please

silverkszlo and others added 4 commits September 8, 2026 17:22
When a recipient moved an incoming share into one of their own folders
and later renamed that folder, Updater::renameChildren passed the mount
point to SharedMount::moveMount. Mount points always end in a slash, and
stripUserFilesPath did not normalize its result, so the slash was stored
in share.file_target. PROPFIND on such a share then returns 500.

Normalize the stripped path so no caller can write a trailing slash, and
repair rows that are already affected.

Signed-off-by: silver <s.szmajduch@posteo.de>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
perf(core): only run the trailing slash share repair once

Signed-off-by: silver <s.szmajduch@posteo.de>

Assisted-by: ClaudeCode:claude-opus-5

[skip ci]
Signed-off-by: silver <s.szmajduch@posteo.de>
@salmart-dev
salmart-dev force-pushed the backport/63956/stable35 branch from c7a2616 to 0d83213 Compare September 8, 2026 15:22
definition: 'Whether the repair step stripping trailing slashes from share targets has already been run.',
lazy: true,
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

make php lint happy

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants