Skip to content

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

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

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

@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

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 force-pushed the fix/fix-share-owner-not-found-crash branch from 15ebe37 to ff53d0a Compare August 6, 2026 07:05
@come-nc
come-nc marked this pull request as ready for review August 6, 2026 07:08
@come-nc
come-nc requested a review from a team as a code owner August 6, 2026 07:08
@come-nc
come-nc requested review from Altahrim, leftybournes, provokateurin and salmart-dev and removed request for a team August 6, 2026 07:08
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