Repository navigation
Closed
Description
Steps to reproduce
- Call
curl -u "user:password" -X PROPFIND -H "Depth: infinity" -H "Content-Type: text/xml" --data-binary "@/tmp/propfind-fileid.xml" "http://localhost/remote.php/webdav/folder" | xmllint --format -where/tmp/propfind-fileid.xmlcontains:
<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:" xmlns:oc="http://owncloud.org/ns">
<!-- retrieve the file's id -->
<a:prop><oc:fileid/></a:prop>
</a:propfind>
- You will get something like this:
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/webdav/folder/</d:href>
<d:propstat>
<d:prop>
<oc:fileid>225364</oc:fileid>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/folder/1.jpg</d:href>
<d:propstat>
<d:prop>
<oc:fileid>225364</oc:fileid>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/folder/2.jpg</d:href>
<d:propstat>
<d:prop>
<oc:fileid>225364</oc:fileid>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/folder/3.jpg</d:href>
<d:propstat>
<d:prop>
<oc:fileid>225364</oc:fileid>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
- Notice the root folder has
fileid225364 and all files inside it have the same id. That's wrong. - Try to ask for fileid of any of these files, like:
curl -u "user:password" -X PROPFIND -H "Content-Type: text/xml" --data-binary "@/tmp/propfind-fileid.xml" "http://localhost/remote.php/webdav/folder/1.jpg" | xmllint --format -. You will get:
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/webdav/folder/1.jpg</d:href>
<d:propstat>
<d:prop>
<oc:fileid>225372</oc:fileid>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
- Notice fileid is correct.
Expected behaviour
When Depth: infinity header supplied, fileid should be file id, not parent folder id.
Server configuration
Operating system: debian jessie
Web server: apache
Database: mysql
PHP version: 7.0
ownCloud version: 10.0.8.5
Updated from an older ownCloud or fresh install: 9.1.x
/settings/integrity/failed: "No errors have been found."
Are you using external storage, if yes which one: local
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Metadata
Metadata
Assignees
Labels
No labels
Activity
ownclouders commentedon Apr 22, 2018
GitMate.io thinks possibly related issues are #28341 (Wrong PROPFIND answer with depth infinity requests), #5777 ([webdav] Wrong MOVE requests deletes directory), #234 (Webdav - Wrong filesize for zip files), #28615 (Webdav API to access files by fileid), and #4370 (webdav via gvfs).
PaulAnnekov commentedon Apr 22, 2018
Duplicate of #28341, closing.
lock commentedon Jul 30, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.