Skip to content

fix(share): Avoid crash when share owner is not found - #62791

Draft
come-nc wants to merge 1 commit into
masterfrom
fix/fix-share-owner-not-found-crash
Draft

fix(share): Avoid crash when share owner is not found#62791
come-nc wants to merge 1 commit into
masterfrom
fix/fix-share-owner-not-found-crash

Conversation

@come-nc

@come-nc come-nc commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
  • Resolves: #

Summary

IShare::getNode is documented to throw only NotFoundException, so catch UserNotFoundException from the level below and wrap it. This avoids crashes from share api controller when listing shares and one of them is broken because its owner has vanished from the backend.
If this gets backported, the caught Exception should be NoUserException from OC instead.

Checklist

AI (if applicable)

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

IShare::getNode is documented to throw only NotFoundException, so catch
 UserNotFoundException from the level below and wrap it. This avoids
 crashes from share api controller when listing shares and one of them
 is broken because its owner has vanished from the backend.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc added this to the Nextcloud 35 milestone Aug 3, 2026
@come-nc come-nc self-assigned this Aug 3, 2026
@come-nc come-nc added bug 3. to review Waiting for reviews labels Aug 3, 2026
@come-nc

come-nc commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/backport to stable34!

@come-nc

come-nc commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/backport! to stable34

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

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant