Skip to content

spaces endpoint does not allow REPORT requests  #4034

Description

@SagarGi

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.

Details

OCIS_VERSION= latest docker pull

Activity

  1. 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[/+] on Jun 27, 2022
  2. 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#[/+] on Jun 27, 2022
  3. changed the title [-]/webdav and `spaces` endpoint does not alloow `REPORT` requests#[/-] [+]/webdav and `spaces` endpoint does not alloow `REPORT` requests[/+] on Jun 27, 2022
  4. SwikritiT commented on Jul 8, 2022

    @SwikritiT
    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
  5. 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[/+] on Jul 8, 2022
  6. self-assigned this
    on Jul 19, 2022
  7. changed the title [-]/webdav and `spaces` endpoint does not alloow `REPORT` requests - tests needs a follow-up[/-] [+]`spaces` endpoint does not allow `REPORT` requests [/+] on Jul 19, 2022
  8. SwikritiT commented on Jul 19, 2022

    @SwikritiT
    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

  9. removed their assignment
    on Jul 19, 2022
  10. micbar commented on Jul 19, 2022

    @micbar
    Contributor

    @aduffeck can you check what is still missing?

  11. modified the milestones: 2.0.0 General Availability, on Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions