Open nabim777 opened 1 year ago
Honestly, I'm not sure if this is a bug. I haven't found any Webdav request in web without remote.php
.
It's too confusing to have a lot of endpoints and use endpoints with/without some part of it.
IMHO I don't think that dev team starts fix legacy to have ability use olds endpoints without remote.php
I just see that the tests use endpoint without remote.php
only for space dav path https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/bootstrap/WebDav.php#L218-L234
maybe we need change it? cc @saw-jan @individual-it
If the dev team won't be fixing old
and new
dav endpoints (to work without remote.php
) then it should be fine but for spaces this (without remote.php
) should work because I suppose, /remote.php
endpoints are just for compatibility and they will be removed/discouraged to use later in the future.
Tested for spaces endpoints:
/dav/spaces
:heavy_check_mark:curl -XREPORT -uadmin:admin "https://localhost:9200/dav/spaces/8c99ec79-9e69-4fe6-a0bc-d97e048f0eae%24e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d" \
-d"<?xml version='1.0' encoding='utf-8' ?>
<oc:search-files xmlns:a='DAV:' xmlns:oc='http://owncloud.org/ns' >
<oc:search>
<oc:pattern>Tags:tag1</oc:pattern>
</oc:search>
</oc:search-files>" -vk
< HTTP/1.1 207 Multi-Status
< Content-Length: 975
...
<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/8c99ec79-9e69-4fe6-a0bc-d97e048f0eae$e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d/fil1.txt</d:href><d:propstat><d:prop><oc:fileid>8c99ec79-9e69-4fe6-a0bc-d97e048f0eae$e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d!4a456eb4-640c-4b7e-b8c4-67c522583dd4</oc:fileid><oc:file-parent>8c99ec79-9e69-4fe6-a0bc-d97e048f0eae$e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d!e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d</oc:file-parent><oc:name>fil1.txt</oc:name><d:getlastmodified>2023-08-03T09:35:12Z</d:getlastmodified><d:getcontenttype>text/plain</d:getcontenttype><oc:permissions>RDNVW</oc:permissions><oc:highlights></oc:highlights><oc:tags>tag1</oc:tags><d:getetag></d:getetag><d:resourcetype></d:resourcetype><d:getcontentlength>7</d:getcontentlength><oc:score>2.873692750930786</oc:score></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>
remote.php/dav/spaces
:heavy_check_mark:curl -XREPORT -uadmin:admin "https://localhost:9200/remote.php/dav/spaces/8c99ec79-9e69-4fe6-a0bc-d97e048f0eae%24e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d" \
-d"<?xml version='1.0' encoding='utf-8' ?>
<oc:search-files xmlns:a='DAV:' xmlns:oc='http://owncloud.org/ns' >
<oc:search>
<oc:pattern>Tags:tag1</oc:pattern>
</oc:search>
</oc:search-files>" -vk
< HTTP/1.1 207 Multi-Status
< Content-Length: 975
...
<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/8c99ec79-9e69-4fe6-a0bc-d97e048f0eae$e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d/fil1.txt</d:href><d:propstat><d:prop><oc:fileid>8c99ec79-9e69-4fe6-a0bc-d97e048f0eae$e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d!4a456eb4-640c-4b7e-b8c4-67c522583dd4</oc:fileid><oc:file-parent>8c99ec79-9e69-4fe6-a0bc-d97e048f0eae$e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d!e2f5e9d7-742a-4e9f-9bed-0fa6b7f0ec1d</oc:file-parent><oc:name>fil1.txt</oc:name><d:getlastmodified>2023-08-03T09:35:12Z</d:getlastmodified><d:getcontenttype>text/plain</d:getcontenttype><oc:permissions>RDNVW</oc:permissions><oc:highlights></oc:highlights><oc:tags>tag1</oc:tags><d:getetag></d:getetag><d:resourcetype></d:resourcetype><d:getcontentlength>7</d:getcontentlength><oc:score>2.873692750930786</oc:score></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>
\
\
@ScharfViktor you can close the issue if there won't be any changes for old and new dav. spaces
endpoints look good.
According to the discussion in https://github.com/owncloud/ocis/issues/7104#issuecomment-1711310103, this issue is closed.
According to the discussion in #7104 (comment), this issue is closed.
This is a different issue than issues #7104 and #7096
REPORT requests with remote.php
should be allowed.
CC @ScharfViktor
Describe the bug
When making API request to search a file by tag and not using
remote.php
in the destination URL, then we get the following results:new
andold
dav path version it returns status code405
spaces
dev path version it returns files only from personal spacesSteps to reproduce
Steps to reproduce the behavior:
personalFile.txt
in personal spaceProject
space.txt
inside project spaceProject
tag1
in both filepersonalFile.txt
andspace.txt
tag1
with following curl command in different dav path version:for old dav path version:
```bash curl -kv -XREPORT https://localhost:9200/webdav \ -u admin:admin \ -d "for new dav path version:
```bash curl -kv -XREPORT https://localhost:9200/dav/files/admin \ -u admin:admin \ -d "for spaces dav path version:
```bash curl -kv -XREPORT https://localhost:9200/dav/spaces/Expected behavior
The expected response should be same as using
remote.php
in the endpointfor old dav path version:
```xml < HTTP/1.1 207 Multi-Status < Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value < Content-Length: 1847 < Content-Range: rows 0-1/2 < Content-Security-Policy: frame-ancestors 'none' < Content-Type: application/xml; charset=utf-8 < Date: Thu, 03 Aug 2023 06:38:09 GMT < Dav: 1, 3, extended-mkcol < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Last-Modified: Thu, 03 Aug 2023 06:38:09 GMT < Vary: Origin < X-Content-Type-Options: nosniff < X-Frame-Options: DENY < X-Request-Id: nabin-OptiPlex-3050/u2704Ztkec-002986 < X-Webdav-Version: 3.1.0-beta.1+92d94afb20 < { [627 bytes data] * TLSv1.2 (IN), TLS header, Supplemental data (23): { [5 bytes data] 100 2033 100 1847 100 186 23774 2394 --:--:-- --:--:-- --:--:-- 26402 * Connection #0 to host localhost left intactfor new dav path version:
```xml < HTTP/1.1 207 Multi-Status < Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value < Content-Length: 1847 < Content-Range: rows 0-1/2 < Content-Security-Policy: frame-ancestors 'none' < Content-Type: application/xml; charset=utf-8 < Date: Thu, 03 Aug 2023 06:40:10 GMT < Dav: 1, 3, extended-mkcol < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Last-Modified: Thu, 03 Aug 2023 06:40:10 GMT < Vary: Origin < X-Content-Type-Options: nosniff < X-Frame-Options: DENY < X-Request-Id: nabin-OptiPlex-3050/u2704Ztkec-002988 < X-Webdav-Version: 3.1.0-beta.1+92d94afb20 < { [627 bytes data] * TLSv1.2 (IN), TLS header, Supplemental data (23): { [5 bytes data] 100 2033 100 1847 100 186 23867 2403 --:--:-- --:--:-- --:--:-- 26402 * Connection #0 to host localhost left intactfor spaces dav path version:
```xml < HTTP/1.1 207 Multi-Status < Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value < Content-Length: 1847 < Content-Range: rows 0-1/2 < Content-Security-Policy: frame-ancestors 'none' < Content-Type: application/xml; charset=utf-8 < Date: Thu, 03 Aug 2023 06:41:59 GMT < Dav: 1, 3, extended-mkcol < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Last-Modified: Thu, 03 Aug 2023 06:41:59 GMT < Vary: Origin < X-Content-Type-Options: nosniff < X-Frame-Options: DENY < X-Request-Id: nabin-OptiPlex-3050/u2704Ztkec-002990 < X-Webdav-Version: 3.1.0-beta.1+92d94afb20 < { [627 bytes data] * TLSv1.2 (IN), TLS header, Supplemental data (23): { [5 bytes data] 100 2033 100 1847 100 186 24772 2494 --:--:-- --:--:-- --:--:-- 27472 * Connection #0 to host localhost left intactActual behavior
for old dav path version:
```xml < HTTP/1.1 405 Method Not Allowed < Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value < Content-Length: 0 < Content-Security-Policy: frame-ancestors 'self' < Date: Thu, 03 Aug 2023 06:43:21 GMT < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Last-Modified: Thu, 03 Aug 2023 06:43:21 GMT < Vary: Origin < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < X-Request-Id: nabin-OptiPlex-3050/u2704Ztkec-003066 < X-Web-Version: 3.1.0-beta.1+92d94afb20 ```for new new path version:
```xml < HTTP/1.1 405 Method Not Allowed < Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value < Content-Length: 0 < Content-Security-Policy: frame-ancestors 'self' < Date: Thu, 03 Aug 2023 06:48:08 GMT < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Last-Modified: Thu, 03 Aug 2023 06:48:08 GMT < Vary: Origin < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < X-Request-Id: nabin-OptiPlex-3050/u2704Ztkec-003142 < X-Web-Version: 3.1.0-beta.1+92d94afb20 ```for spaces new path version:
```xml < HTTP/1.1 207 Multi-Status < Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value < Content-Length: 1847 < Content-Range: rows 0-1/2 < Content-Security-Policy: frame-ancestors 'none' < Content-Type: application/xml; charset=utf-8 < Date: Thu, 03 Aug 2023 06:49:43 GMT < Dav: 1, 3, extended-mkcol < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Last-Modified: Thu, 03 Aug 2023 06:49:43 GMT < Vary: Origin < X-Content-Type-Options: nosniff < X-Frame-Options: DENY < X-Request-Id: nabin-OptiPlex-3050/u2704Ztkec-003146 < X-Webdav-Version: 3.1.0-beta.1+92d94afb20 < { [627 bytes data] * TLSv1.2 (IN), TLS header, Supplemental data (23): { [5 bytes data] 100 2033 100 1847 100 186 24731 2490 --:--:-- --:--:-- --:--:-- 27472 * Connection #0 to host localhost left intact