Skip to content

[Bug]: DAV missing collection type in paginated PROPFIND requests #53674

@salmart-dev

Description

@salmart-dev

⚠️ This issue respects the following points: ⚠️

Bug description

When using the PROPFIND method in a collection that contains other collections and paginating to a page after the first one, no type tag is returned for collections any longer.

Steps to reproduce

  1. Start a dev environment
  2. Run the following command to get the first page of results
curl -D - --location --request PROPFIND 'stable31.local/remote.php/dav/files/admin/' \
--header 'Depth: 1' \
--header 'X-NC-Paginate: true' \
--header 'X-NC-Paginate-Count: 2' \
--header 'Content-Type: application/xml' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--data '<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:">
  <d:prop>
    <d:displayname /><d:resourcetype />
  </d:prop>
</d:propfind>'
  1. Observe that the response contains the <d:collection/> tag for collections
  2. Copy the value of the X-NC-Paginate-Token and replace it in the next command
  3. Run
curl --location --request PROPFIND 'stable31.local/remote.php/dav/files/admin/' \
--header 'Depth: 1' \
--header 'X-NC-Paginate: true' \
--header 'X-NC-Paginate-Count: 2' \
--header 'X-NC-Paginate-Offset: 2' \
--header 'X-NC-Paginate-Token: F+BD78AEFQMFmfPdmPB18WXJRotooJ3S' \
--header 'Content-Type: application/xml' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--data '<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:">
  <d:prop>
    <d:displayname /><d:resourcetype />
  </d:prop>
</d:propfind>'
  1. Observe that the tag <d:collection/> is missing for collections

Expected behavior

Paginated requests should contain the <d:collection/> tag for collections.

Nextcloud Server version

master

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

Reported in nextcloud/nextcloudfileproviderkit#95

Metadata

Metadata

Assignees

Type

Projects

Status

☑️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions