owncloud / owncloud/core

PROPFIND shows external storage that is not available

Open
#39,470 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type:Bug
Dominant language
PHP
Stars
8.8k
Forks
2.1k
Avg merge
20h 7m
Merged PRs (30d)
41

Description

Steps to reproduce
  1. Create a new user
  2. 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
  1. 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 
  1. 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)
  2. 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.