nextcloud / nextcloud/server

[Bug]: Custom shared link can be reused without cross check

Open
#61,246 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 33-feedback bug feature: sharing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

With Nextcloud 31, the features formerly provided via the share renamer app was included in the main application.
The feature works as expected, but it turned out that one could take the token of an existing/active link and use it for a different file. There is no cross check implemented to check whether or not a token is already in use.

The link leads to the file that was shared with the link first. When that token is changed or the link deactivated, it switches to the newly created one.

Steps to reproduce
  1. Create link
  2. Copy the token of it
  3. Create second link
  4. Use option "customize link" on it and paste the token from step 2
Expected behavior

A mechanism should check for already existing tokens and display a warning/error message if a token is already in use.

Nextcloud Server version

33

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.5

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Trace the custom shared-link token handling from the reproduction steps, inspect how existing tokens are checked, and identify the path that reports invalid or conflicting custom links. Done means reusing an active token is rejected with a warning or error while valid custom links continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.