Skip to content

[stable34] fix(sharing): set STATUS_ACCEPTED when creating USERGROUP subshare on…#60924

Merged
AndyScherzinger merged 1 commit into
stable34from
backport/59813/stable34
Jun 3, 2026
Merged

[stable34] fix(sharing): set STATUS_ACCEPTED when creating USERGROUP subshare on…#60924
AndyScherzinger merged 1 commit into
stable34from
backport/59813/stable34

Conversation

@backportbot

@backportbot backportbot Bot commented Jun 2, 2026

Copy link
Copy Markdown

Backport of PR #59813

…shares

When an ownCloud-migrated group share (which has no per-user USERGROUP
subshare) is renamed for the first time, DefaultShareProvider::move()
inserted a new USERGROUP row without setting `accepted`. The column
defaulted to 0 (STATUS_PENDING), causing MountProvider to skip the
share on the next login — the shared file disappeared for the recipient.

Fix: set accepted = STATUS_ACCEPTED explicitly on the INSERT in
DefaultShareProvider::move() for the TYPE_GROUP branch.

Secondary fix: SharedMount::moveMount() silently returned true when
updateFileTarget() threw (e.g. group no longer exists on an OC-migrated
instance). Set $result = false in the catch block so View::rename()
propagates the failure instead of silently corrupting VFS state.

An opt-in occ command (sharing:fix-owncloud-group-shares) with --dry-run
support is included to repair existing broken instances. It targets only
TYPE_USERGROUP subshares with accepted=STATUS_PENDING and permissions!=0
(shares that were accepted but broken by the missing column default),
leaving explicitly declined shares (permissions=0) untouched.

AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@backportbot backportbot Bot requested review from a team, come-nc and skjnldsv as code owners June 2, 2026 09:14
@backportbot backportbot Bot requested review from ArtificialOwl, CarlSchwan, blizzz, leftybournes and miaulalala and removed request for a team June 2, 2026 09:14
@backportbot backportbot Bot added this to the Nextcloud 34 milestone Jun 2, 2026
@AndyScherzinger AndyScherzinger merged commit 132929b into stable34 Jun 3, 2026
224 of 245 checks passed
@AndyScherzinger AndyScherzinger deleted the backport/59813/stable34 branch June 3, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment