Skip to content

Conversation

@ArtificialOwl
Copy link
Member

@ArtificialOwl ArtificialOwl commented Apr 16, 2025

This to avoid an exception when a file is shared to multiple teams and current user is not a member of one of them.

Reproduce the original issue:

  • 3 users: user1, user2, user3.
  • 2 teams: team1 with user2+user3 and team2 with user2
  • 1 folder created by user1 and shared to user2
  • user2 reshare the shared folder to team1 and team2
  • shares to team1 has no reshare permission,
  • user3 when browsing the right panel sharing tab will generate an exception.

The reason for that is that when verifying resharing rights, all shares are checked until resharing permissions are found.
When checking those shares, if current user is not a member of recipient team, an exception is generated but not properly catched.

@ArtificialOwl ArtificialOwl requested a review from a team as a code owner April 16, 2025 10:09
@ArtificialOwl ArtificialOwl requested review from come-nc, icewind1991 and sorbaugh and removed request for a team April 16, 2025 10:09
@ArtificialOwl ArtificialOwl added the 3. to review Waiting for reviews label Apr 16, 2025
@ArtificialOwl ArtificialOwl added this to the Nextcloud 32 milestone Apr 16, 2025
@ArtificialOwl
Copy link
Member Author

/backport to stable31

@ArtificialOwl
Copy link
Member Author

/backport to stable30

@ArtificialOwl
Copy link
Member Author

/backport to stable29

Comment on lines +1995 to 1996
} catch (\Exception) {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s a broad catch, at least log the exception on debug log level, no?

This was referenced Aug 22, 2025
This was referenced Sep 2, 2025
This was referenced Sep 25, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants