[Bug]: Old SMB external storage info is kept when changing configuration
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
When changing the configuration of an SMB external storage, the previous configuration is kept in the database in oc_storages, together with all the metadata stored in oc_filecache about files in that external storage.
Steps to reproduce
- Create an SMB external storage as an
adminwith "Global credentials, manually entered" as the authentication method. User 1sets their global credentials and accesses that external storage.- The
adminmodifies the configuration of that external storage and sets "Login and password" as the authentication method.
Expected behavior
The storage info for User 1 is removed from oc_storages and oc_filecache, since the authentication has changed and User 1 can no longer access it using their global credentials.
Nextcloud Server version
30
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 by tracing how changing an SMB external storage configuration updates oc_storages and related oc_filecache metadata. Reproduce the authentication-method change described in the issue, then verify that User 1's stored storage information and file metadata are removed when global credentials are no longer valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100