Skip to content

fix: unique custom tokens for share links - #65725

Merged
leftybournes merged 3 commits into
masterfrom
leftybournes/fix/sharing_links_unique_custom_token
Oct 30, 2026
Merged

leftybournes merged 3 commits into
masterfrom
leftybournes/fix/sharing_links_unique_custom_token

Conversation

@leftybournes

@leftybournes leftybournes commented Oct 20, 2026 •

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

It is currently possible to set a public share's token to an already existing token. For example, if a share with the token 'abc123' already exists, another share can be created with the exact same token. But when visiting the share via /s/abc123, it always resolves to the first share that was created.

This fixes it so that it no longer allows a user to set an already used token and shows an error.

Checklist

AI (if applicable)

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

@leftybournes leftybournes added this to the Nextcloud 36 milestone Oct 20, 2026
@leftybournes
leftybournes requested a review from a team as a code owner October 20, 2026 14:48
@leftybournes
leftybournes requested review from Altahrim, icewind1991, salmart-dev and sorbaugh and removed request for a team October 20, 2026 14:48
@leftybournes

leftybournes commented Oct 21, 2026 •

Copy link
Copy Markdown
Member Author

Failing tests are related. Looking into it 👀

Edit: Done

@leftybournes
leftybournes force-pushed the leftybournes/fix/sharing_links_unique_custom_token branch from 8bed7df to f1b0ebd Compare October 29, 2026 07:02
Signed-off-by: Kent Delante <kent@delante.me>
@leftybournes
leftybournes force-pushed the leftybournes/fix/sharing_links_unique_custom_token branch 2 times, most recently from d9ea886 to 92f0ec1 Compare October 29, 2026 08:16

@cristianscheid cristianscheid left a comment

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.

CI errors seem related

Signed-off-by: Kent Delante <kent@delante.me>
Signed-off-by: Kent Delante <kent@delante.me>
@leftybournes
leftybournes force-pushed the leftybournes/fix/sharing_links_unique_custom_token branch from 92f0ec1 to 665e61d Compare October 29, 2026 23:11
@leftybournes
leftybournes requested review from a team as code owners October 29, 2026 23:11
@leftybournes
leftybournes requested review from kristian-zendato, pabzm and skjnldsv and removed request for a team October 29, 2026 23:11
@leftybournes

Copy link
Copy Markdown
Member Author

@cristianscheid It was a linter error. It's fixed now.

@leftybournes

Copy link
Copy Markdown
Member Author

/backport to stable35

@leftybournes

Copy link
Copy Markdown
Member Author

/backport to stable34

@leftybournes

Copy link
Copy Markdown
Member Author

/backport to stable33

@leftybournes
leftybournes merged commit 7638968 into master Oct 30, 2026
247 of 253 checks passed
@leftybournes
leftybournes deleted the leftybournes/fix/sharing_links_unique_custom_token branch October 30, 2026 12:55
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