Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spaces endpoint does not allow REPORT requests #4034

Closed
SagarGi opened this issue Jun 27, 2022 · 3 comments · Fixed by #4118 or #4661
Closed

spaces endpoint does not allow REPORT requests #4034

SagarGi opened this issue Jun 27, 2022 · 3 comments · Fixed by #4118 or #4661
Labels

Comments

@SagarGi
Copy link
Member

SagarGi commented Jun 27, 2022

Description

While searching for files | folder with REPORT method, new and old webdav gives response for the search request but spaces gives a method not allowed response.

Steps to reproduce

  1. As user Einstein create resources simple.txt, simple-folder, simple-file.txt
  2. Search for simple using spaces endpoint
curl -X REPORT -vk -u einstein:relativity https://host.docker.internal:9200/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$4c510ada-c86b-4815-8820-42cdf82c3d51 -d '<?xml version="1.0" encoding="UTF-8"?>
<oc:search-files
    xmlns:a="DAV:"
    xmlns:oc="http://owncloud.org/ns">
    <oc:search>
        <oc:pattern>simple</oc:pattern>
    </oc:search>
</oc:search-files>'


Expected behavior

The request should work like in old/new wedav endpoints

curl -X REPORT -vk -u einstein:relativity https://host.docker.internal:9200/remote.php/dav/files/Einstein -d '<?xml version="1.0" encoding="UTF-8"?>
<oc:search-files
    xmlns:a="DAV:"
    xmlns:oc="http://owncloud.org/ns">
    <oc:search>
        <oc:pattern>simple</oc:pattern>
    </oc:search>
</oc:search-files>'
Response on new/old webdav
<d:multistatus
	xmlns:s="http://sabredav.org/ns"
	xmlns:d="DAV:"
	xmlns:oc="http://owncloud.org/ns">
	<d:response>
		<d:href>/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157%214c510ada-c86b-4815-8820-42cdf82c3d51/simple</d:href>
		<d:propstat>
			<d:prop>
				<oc:fileid>1284d238-aa92-42ce-bdc4-0b0000009157!f234c905-4697-490f-a40d-8d8bb5cd3a13</oc:fileid>
				<d:getetag></d:getetag>
				<d:getlastmodified>2022-07-19T07:00:05Z</d:getlastmodified>
				<d:getcontenttype>httpd/unix-directory</d:getcontenttype>
				<d:resourcetype>
					<d:collection/>
				</d:resourcetype>
				<oc:size>0</oc:size>
				<oc:score>0.7765131592750549</oc:score>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
	</d:response>
	<d:response>
		<d:href>/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157%214c510ada-c86b-4815-8820-42cdf82c3d51/simple-file</d:href>
		<d:propstat>
			<d:prop>
				<oc:fileid>1284d238-aa92-42ce-bdc4-0b0000009157!d3535d8f-c3e8-4792-8e31-c75e0de7fe19</oc:fileid>
				<d:getetag></d:getetag>
				<d:getlastmodified>2022-07-19T07:00:13Z</d:getlastmodified>
				<d:getcontenttype>httpd/unix-directory</d:getcontenttype>
				<d:resourcetype>
					<d:collection/>
				</d:resourcetype>
				<oc:size>0</oc:size>
				<oc:score>0.7765131592750549</oc:score>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
	</d:response>
	<d:response>
		<d:href>/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157%214c510ada-c86b-4815-8820-42cdf82c3d51/simple-simple</d:href>
		<d:propstat>
			<d:prop>
				<oc:fileid>1284d238-aa92-42ce-bdc4-0b0000009157!337e82cc-873e-4a8d-ab5f-0ceccf33ff49</oc:fileid>
				<d:getetag></d:getetag>
				<d:getlastmodified>2022-07-19T07:00:20Z</d:getlastmodified>
				<d:getcontenttype>httpd/unix-directory</d:getcontenttype>
				<d:resourcetype>
					<d:collection/>
				</d:resourcetype>
				<oc:size>0</oc:size>
				<oc:score>0.7765131592750549</oc:score>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
	</d:response>
	<d:response>
		<d:href>/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157%214c510ada-c86b-4815-8820-42cdf82c3d51/simple-folder</d:href>
		<d:propstat>
			<d:prop>
				<oc:fileid>1284d238-aa92-42ce-bdc4-0b0000009157!4f1a42d4-33b7-49d3-81bd-4e63c2801e83</oc:fileid>
				<d:getetag></d:getetag>
				<d* Connection #0 to host host.docker.internal left intact
:getlastmodified>2022-07-19T06:21:01Z
				</d:getlastmodified>
				<d:getcontenttype>httpd/unix-directory</d:getcontenttype>
				<d:resourcetype>
					<d:collection/>
				</d:resourcetype>
				<oc:size>0</oc:size>
				<oc:score>0.6664775013923645</oc:score>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
	</d:response>
</d:multistatus>

Actual behavior

Gives 405 status code.

Response on (spaces)
*   Trying 127.0.0.1:9200...
* TCP_NODELAY set
* Connected to host.docker.internal (127.0.0.1) port 9200 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: O=Acme Corp; CN=OCIS
*  start date: Jul 19 06:19:00 2022 GMT
*  expire date: Jul 19 06:19:00 2023 GMT
*  issuer: O=Acme Corp; CN=OCIS
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Server auth using Basic with user 'einstein'
> REPORT /dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157c510ada-c86b-4815-8820-42cdf82c3d51 HTTP/1.1
> Host: host.docker.internal:9200
> Authorization: Basic ZWluc3RlaW46cmVsYXRpdml0eQ==
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Length: 205
> Content-Type: application/x-www-form-urlencoded
> 
* upload completely sent off: 205 out of 205 bytes
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* Mark bundle as not supporting multiuse
< 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: Tue, 19 Jul 2022 07:25:03 GMT
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Last-Modified: Tue, 19 Jul 2022 07:25:03 GMT
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-Web-Version: 2.0.0-beta.4+55cfcec98
< 
* Connection #0 to host host.docker.internal left intact

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

OCIS_VERSION= latest docker pull

@SagarGi SagarGi changed the title new webdav gives response but old and spaces endpoint gives a method not allowed for REPORT search new webdav gives response but old and spaces endpoint gives a method not allowed for REPORT search request Jun 27, 2022
@individual-it individual-it changed the title new webdav gives response but old and spaces endpoint gives a method not allowed for REPORT search request /webdav and spaces endpoint does not alloow REPORT requests# Jun 27, 2022
@individual-it individual-it changed the title /webdav and spaces endpoint does not alloow REPORT requests# /webdav and spaces endpoint does not alloow REPORT requests Jun 27, 2022
@SwikritiT
Copy link
Contributor

SwikritiT commented Jul 8, 2022

A lot of tests linked with this issue which needs follow-up so re-opening

#### [/webdav and spaces endpoint does not alloow REPORT requests](https://github.com/owncloud/ocis/issues/4034)
- [apiWebdavOperations/search.feature:48](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L48)
- [apiWebdavOperations/search.feature:70](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L70)
- [apiWebdavOperations/search.feature:93](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L93)
- [apiWebdavOperations/search.feature:108](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L108)
- [apiWebdavOperations/search.feature:126](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L126)
- [apiWebdavOperations/search.feature:132](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L132)
- [apiWebdavOperations/search.feature:150](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L150)
- [apiWebdavOperations/search.feature:156](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L156)
- [apiWebdavOperations/search.feature:180](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L180)
- [apiWebdavOperations/search.feature:207](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L207)
- [apiWebdavOperations/search.feature:213](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L213)
- [apiWebdavOperations/search.feature:239](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L239)
- [apiWebdavOperations/search.feature:245](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L245)
- [apiWebdavOperations/search.feature:270](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L270)

TODO QA Team:

  • Follow up on why the tests are still failing
  • adjust tests if necessary or create new issue if there's a new one

@SwikritiT SwikritiT reopened this Jul 8, 2022
@SwikritiT SwikritiT changed the title /webdav and spaces endpoint does not alloow REPORT requests /webdav and spaces endpoint does not alloow REPORT requests - tests needs a follow-up Jul 8, 2022
@SwikritiT SwikritiT self-assigned this Jul 19, 2022
@SwikritiT SwikritiT changed the title /webdav and spaces endpoint does not alloow REPORT requests - tests needs a follow-up spaces endpoint does not allow REPORT requests Jul 19, 2022
@SwikritiT
Copy link
Contributor

A lot of tests linked with this issue which needs follow-up so re-opening

#### [/webdav and spaces endpoint does not alloow REPORT requests](https://github.com/owncloud/ocis/issues/4034)
- [apiWebdavOperations/search.feature:48](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L48)
- [apiWebdavOperations/search.feature:70](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L70)
- [apiWebdavOperations/search.feature:93](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L93)
- [apiWebdavOperations/search.feature:108](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L108)
- [apiWebdavOperations/search.feature:126](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L126)
- [apiWebdavOperations/search.feature:132](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L132)
- [apiWebdavOperations/search.feature:150](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L150)
- [apiWebdavOperations/search.feature:156](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L156)
- [apiWebdavOperations/search.feature:180](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L180)
- [apiWebdavOperations/search.feature:207](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L207)
- [apiWebdavOperations/search.feature:213](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L213)
- [apiWebdavOperations/search.feature:239](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L239)
- [apiWebdavOperations/search.feature:245](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L245)
- [apiWebdavOperations/search.feature:270](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L270)

TODO QA Team:

  • Follow up on why the tests are still failing
  • adjust tests if necessary or create new issue if there's a new one

The tests are still failing because the issue is not fixed for spaces PR #4118 fixed it for old dav but for spaces the issue still exists. I have updated the description accordingly

@SwikritiT SwikritiT removed their assignment Jul 19, 2022
@micbar
Copy link
Contributor

micbar commented Jul 19, 2022

@aduffeck can you check what is still missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
3 participants