Skip to content

fix(shares): Fix infinite loop when all shares are invalid - #55813

Merged
come-nc merged 1 commit into
masterfrom
fix/fix-infinite-loop-in-share-manager
Dec 15, 2025
Merged

fix(shares): Fix infinite loop when all shares are invalid#55813
come-nc merged 1 commit into
masterfrom
fix/fix-infinite-loop-in-share-manager

Conversation

@come-nc

@come-nccome-nc commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Summary

I do not know if there are other ways to trigger the issue than this one:

  1. Use LDAP
  2. Enable option to mark remnants as disabled
  3. occ config:app:set files_sharing hide_disabled_user_shares --value yes
  4. With an LDAP user, share something
  5. Change the LDAP filter to exclude this user
  6. occ ldap:check-user <myuser> (turns the user into a remnant)
  7. occ ldap:show-remnants -> The command never finish

This is because in commit 8c9aa9a , I made it possible for method checkShare to throw ShareNotFound without deleting the share.
I’m now passing the added count as a reference to the method so that it get decremented if needed only.

Checklist

@come-nccome-nc added this to the Nextcloud 33 milestone Oct 16, 2025
@come-nccome-nc self-assigned this Oct 16, 2025
@come-nc
come-nc requested a review from a team as a code ownerOctober 16, 2025 15:07
@come-nccome-nc added the 3. to review Waiting for reviews label Oct 16, 2025
@come-nc
come-nc requested review from ArtificialOwl, leftybournes and nfebe and removed request for a teamOctober 16, 2025 15:07
@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable32

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable31

@come-nc

Copy link
Copy Markdown
ContributorAuthor

/backport to stable30

@come-nc

Copy link
Copy Markdown
ContributorAuthor

Note: all remnant accounts are listed with "N" in the "Sharer" column, even if they have (hidden) shares.

This is because remnants are seen as disabled and their shares deactivated. We should hide the column or fix the value in it.

Comment threadlib/private/Share20/Manager.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
come-ncforce-pushed the fix/fix-infinite-loop-in-share-manager branch from 9c3a52e to 3e8502dCompareDecember 15, 2025 16:02
@come-nc
come-nc merged commit 197db6a into masterDec 15, 2025
231 of 239 checks passed
@come-nc
come-nc deleted the fix/fix-infinite-loop-in-share-manager branch December 15, 2025 19:17
@nextcloud-botnextcloud-bot mentioned this pull request Jan 6, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@come-nc@leftybournes@provokateurin