PROPFIND shows external storage that is not available
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
Steps to reproduce
- Create a new user
- Using the occ command create a new external storage mount
sudo -u www-data ./occ files_external:create ext2 local null::null -c datadir=tests/acceptance/ext2
- Upload a file to the external storage using the webdav api
curl -XPUT http://localhost/core/remote.php/webdav/ext2/file.txt -u tu1:tu1 -d "hello" -vk
- rename the external storage folder to a different name on the file system where it is mounted to owncloud ( to make the folder unavailable for owncloud)
- Use PROPFIND to get the contents in the external storage folder
curl -XPROPFIND http://localhost/core/remote.php/webdav/ext2 -u tu1:tu1 | xmllint --format -
note this behavior is not shown if the user is logged so it is only reproduced when the steps are done through api and cli only.
Expected behaviour
return 404 with message the folder is not available
Actual behaviour
gives 207 and returns the content of the old folder
Server configuration
Operating system: ubuntu 20.04
Web server: apache2
Database: sqlite
PHP version: 7.4
ownCloud version: (see ownCloud admin page) git-master
Updated from an older ownCloud or fresh install: fresh
Where did you install ownCloud from: git
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 reproducing the issue with the listed occ command and PROPFIND request against the external storage mount. Trace the WebDAV PROPFIND handling and external-storage availability checks mentioned by the reproduction; done means an unavailable mount returns 404 with an unavailable-folder message instead of 207 and stale content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100