[Bug]: In share by link, setting password failure potentially exposes data
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
In some workflows, an attempt to configure a password protected link fails, leaving the share valid yet unprotected.
On mobile (android), a temporary notification is displayed, after which it disappears within seconds. On some mobile platforms (such as in my own case, prompting this report), floating action buttons obscure the message so it is hidden from the user at the time of failure.
On the web browser, the warning is permanent (requires dismissal) and more prominent. However, in some circumstances a user may still miss the message, for example by closing the browser window too quickly.
The end result of this common workflow is that sensitive data, intended to be password protected, may be accessible through a publicly disclosed link until the mistake is noticed.
Steps to reproduce
- Create a new share link
- Customize link
- Set password = 123
- Note transient nature of the failure notification
- Customize link
- Note that 'Set password' checkbox is set, but password field is blank.
In essence, by this method of enforcing good password standards, a blank password is allowed.
Expected behavior
Mitigations:
- Permanent high priority notification of the
Set Passwordfailure in the menu bar notification area - Use random password rather than blank password as the failure mode default value
Expected behavior:
- The shared link is invalidated if a password attempt was made, but failed. The link should remain invalid for as long as the
Set Passwordcheckbox is set but the value does not meet minimum security requirements.
Installation method
Community Docker image
Nextcloud Server version
28
Operating system
Other
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the share-link “Customize link” flow and reproduce the failed password attempt described in the steps. Trace the validation and failure-notification paths, then verify that a failed password configuration cannot leave the link publicly usable while the checkbox remains set, including the reported mobile and web notification behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100