ocis
ocis copied to clipboard
same `href` in REPORT request for all `dav-path-version`
Describe the bug
for the all dav-path-version
, when a user or admin searches for a resource then the response contains same href
Steps to reproduce
Steps to reproduce the behavior:
- As an
admin
, create a filefile.txt
- As an
admin
, searches resourcesfile
through API using the curl command
search curl command:
for old dav path version
curl -kv -XREPORT https://localhost:9200/webdav \
-u admin:admin \
-d "<?xml version='1.0' encoding='utf-8' ?>
<oc:search-files xmlns:a='DAV:' xmlns:oc='http://owncloud.org/ns' >
<oc:search>
<oc:pattern>file</oc:pattern>
</oc:search>
</oc:search-files>" | xmllint --format -
for new dav path version
curl -kv -XREPORT https://localhost:9200/dav/files/admin \
-u admin:admin \
-d "<?xml version='1.0' encoding='utf-8' ?>
<oc:search-files xmlns:a='DAV:' xmlns:oc='http://owncloud.org/ns' >
<oc:search>
<oc:pattern>file</oc:pattern>
</oc:search>
</oc:search-files>" | xmllint --format -
for space dav path
curl -kv -XREPORT https://localhost:9200/remote.php/dav/spaces/<personal-space-id>\
-u admin:admin \
-d "<?xml version='1.0' encoding='utf-8' ?>
<oc:search-files xmlns:a='DAV:' xmlns:oc='http://owncloud.org/ns' >
<oc:search>
<oc:pattern>file</oc:pattern>
</oc:search>
</oc:search-files>" | xmllint --format -
Expected behavior
href
in response should be different for specific dav-path-version
Actual behavior
for all path version same responses
< HTTP/1.1 207 Multi-Status
< Content-Length: 972
< Content-Range: rows 0-0/1
< Content-Type: application/xml; charset=utf-8
< Date: Thu, 17 Aug 2023 10:39:09 GMT
< Dav: 1, 3, extended-mkcol
< X-Request-Id: nabin-OptiPlex-3050/21p7P1OefW-004090
<
{ [946 bytes data]
* TLSv1.2 (IN), TLS header, Supplemental data (23):
{ [5 bytes data]
100 1153 100 972 100 181 15412 2870 --:--:-- --:--:-- --:--:-- 18596
* Connection #0 to host localhost left intact
<?xml version="1.0"?>
<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/dav/spaces/c3388f05-07ac-4f4c-97e4-f03f4d4e9001$82014bc9-dae1-4a68-b7f9-baf721a6c00f/file.txt</d:href>
<d:propstat>
<d:prop>
<oc:fileid>c3388f05-07ac-4f4c-97e4-f03f4d4e9001$82014bc9-dae1-4a68-b7f9-baf721a6c00f!77b3f71c-3c0c-42ba-aa9e-2ee9f5594e1f</oc:fileid>
<oc:file-parent>c3388f05-07ac-4f4c-97e4-f03f4d4e9001$82014bc9-dae1-4a68-b7f9-baf721a6c00f!82014bc9-dae1-4a68-b7f9-baf721a6c00f</oc:file-parent>
<oc:name>file.txt</oc:name>
<d:getlastmodified>2023-08-17T09:25:34Z</d:getlastmodified>
<d:getcontenttype>text/plain</d:getcontenttype>
<oc:permissions>RDNVW</oc:permissions>
<oc:highlights/>
<oc:tags/>
<d:getetag/>
<d:resourcetype/>
<d:getcontentlength>0</d:getcontentlength>
<oc:score>1.3805915117263794</oc:score>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>