Skip to content

[stable30] fix(sharing): Allow public share access for everyone#56796

Open
backportbot[bot] wants to merge 1 commit into
stable30from
backport/55811/stable30
Open

[stable30] fix(sharing): Allow public share access for everyone#56796
backportbot[bot] wants to merge 1 commit into
stable30from
backport/55811/stable30

Conversation

@backportbot

@backportbot backportbot Bot commented Dec 2, 2025

Copy link
Copy Markdown

Backport of #55811

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@blizzz

blizzz commented Jan 15, 2026

Copy link
Copy Markdown
Member

@nfebe also here, do we need this backport?

@blizzz

blizzz commented Jun 25, 2026

Copy link
Copy Markdown
Member

@nfebe should close?

When a logged-in user accesses a public share link in the same browser,
the system was incorrectly checking if that user's groups were excluded
from creating link shares. This caused share not found errors for users
in excluded groups, even though public shares should be accessible to anyone
with the link.

The group exclusion setting (`shareapi_allow_links_exclude_groups`) is
intended to restrict share creation, not share access. Public shares
are meant to be anonymous and accessible regardless of the viewer identity
or group membership.

We now check the exclusion for the share creator and not the viewer.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
@nfebe nfebe force-pushed the backport/55811/stable30 branch from b076101 to 6eda258 Compare June 25, 2026 10:42
@nfebe nfebe marked this pull request as ready for review June 25, 2026 10:43
@nfebe nfebe requested a review from sorbaugh June 25, 2026 10:44
* @param ?IUser $user User to check against group exclusions, defaults to current session user
* @return bool
* @since 9.0.0
* @since 33.0.0 Added optional $user parameter

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

33.0.0 should be adjusted to match next 33 release version, no?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yes

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.

3 participants