Skip to content

fix(files_sharing): skip unresolvable share recipients#62368

Open
Antreesy wants to merge 1 commit into
masterfrom
fix/18415/talk-share-fail-for-orphan-user
Open

fix(files_sharing): skip unresolvable share recipients#62368
Antreesy wants to merge 1 commit into
masterfrom
fix/18415/talk-share-fail-for-orphan-user

Conversation

@Antreesy

@Antreesy Antreesy commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

in SharesUpdatedListener, a share recipient may reference a user id that no backend can resolve anymore (e.g. with LazyUser::getUID()) - like remnant / incorrectly removed user.

Example: Talk application supplies LazyUsers from oc_talk_attendees table, which can get desynced from the user backend (e.g. LDAP entries)

Skip this recipient instead of aborting the share operation resolve the issue. As listener is running as a post-effect, and share is already created (at least to the room -> to the group), it should be a safe reason to catch and skip?

To test:

  1. Easiest path: create a rogue entry in oc_talk_attendees, with non-existing id, omit capability 'conversation-subfolders' to utilize legacy share mechanism (each file is separate share), share a file to the room => POST request should fail with 500
  2. Complicated path: find a way for LDAP to clear mapping / execute similar flow to leave a rogur entry, then same as in opt.1

TODO

  • Sanity check
  • Possible side-effects?
  • For backports - should use OC\User\NoUserException ?

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy added this to the Nextcloud 35 milestone Jul 21, 2026
@Antreesy Antreesy self-assigned this Jul 21, 2026
@Antreesy
Antreesy requested a review from a team as a code owner July 21, 2026 14:48
@Antreesy
Antreesy requested review from leftybournes and salmart-dev and removed request for a team July 21, 2026 14:48
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.

[Bug] Talk fails to upload files to the conversation, if one of participants is gone (orphan attendee from former LDAP user)

3 participants