Skip to content

PROPFIND on trashbin with Depth: infinity only shows the first level #1116

Closed

Description

@individual-it
  1. create a folder
  2. upload a file into the folder
  3. delete the folder
  4. query the trashbin with Depth: infinity - curl -k -u einstein:relativity -X PROPFIND https://localhost:9200/remote.php/dav/trash-bin/einstein -H'Depth: infinity' -d'<?xml version="1.0"?> <d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:ocs="http://open-collaboration-services.org/ns"> <d:prop><oc:trashbin-original-filename/><oc:trashbin-original-location/><oc:trashbin-delete-timestamp/><d:getlastmodified/></d:prop> </d:propfind>' |xmllint --format -

expected:
all levels of trashbin content are displayed

actual:
only first level is displayed:

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/trash-bin/</d:href>
    <d:propstat>
      <d:prop>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <oc:trashbin-original-filename/>
        <oc:trashbin-original-location/>
        <oc:trashbin-delete-datetime/>
        <d:getcontentlength/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/trash-bin/4c510ada-c86b-4815-8820-42cdf82c3d51:23c0af3a-610f-46b8-b5d8-0d93f81db096/</d:href>
    <d:propstat>
      <d:prop>
        <oc:trashbin-original-filename>New folder</oc:trashbin-original-filename>
        <oc:trashbin-original-location>New folder</oc:trashbin-original-location>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <oc:trashbin-delete-timestamp/>
        <d:getlastmodified/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Activity

  1. individual-it commented on Dec 16, 2020

    @individual-it
    MemberAuthor
  2. removed their assignment
    on Dec 17, 2020
  3. added
    Category:Defect
    on Jan 13, 2021
  4. dpakach commented on Jun 28, 2021

    @dpakach
    Contributor

    Another side-effect of this issue we cannot restore an subfolder or file from a deleted folder which can be done in oc10

  5. v-scharf commented on Sep 6, 2021

    @v-scharf
    Contributor

    re-tested with local server oCIS version 1.11.0
    still relevant

  6. C0rby commented on Oct 21, 2021

    @C0rby
    Contributor

    I tested it locally with the current ocis master and it works.

    curl -k -s -X PROPFIND -u einstein:relativity 'https://localhost:9200/dav/trash-bin/einstein/' -H 'Depth: infinity' |
     xmllint -format -
    <?xml version="1.0" encoding="utf-8"?>
    <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
      <d:response>
        <d:href>/dav/trash-bin/</d:href>
        <d:propstat>
          <d:prop>
            <d:resourcetype>
              <d:collection/>
            </d:resourcetype>
          </d:prop>
          <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
        <d:propstat>
          <d:prop>
            <oc:trashbin-original-filename/>
            <oc:trashbin-original-location/>
            <oc:trashbin-delete-datetime/>
            <d:getcontentlength/>
          </d:prop>
          <d:status>HTTP/1.1 404 Not Found</d:status>
        </d:propstat>
      </d:response>
      <d:response>
        <d:href>/dav/trash-bin/einstein/283650db-79ca-4b0c-88ea-aee465dcd03a/</d:href>
        <d:propstat>
          <d:prop>
            <oc:trashbin-original-filename>f1</oc:trashbin-original-filename>
            <oc:trashbin-original-location>f1</oc:trashbin-original-location>
            <oc:trashbin-delete-timestamp>1634805066</oc:trashbin-delete-timestamp>
            <oc:trashbin-delete-datetime>Thu, 21 Oct 2021 08:31:06 +0000</oc:trashbin-delete-datetime>
            <d:resourcetype>
              <d:collection/>
            </d:resourcetype>
          </d:prop>
          <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
      </d:response>
      <d:response>
        <d:href>/dav/trash-bin/einstein/283650db-79ca-4b0c-88ea-aee465dcd03a/f2/</d:href>
        <d:propstat>
          <d:prop>
            <oc:trashbin-original-filename>f2</oc:trashbin-original-filename>
            <oc:trashbin-original-location>f1/f2</oc:trashbin-original-location>
            <oc:trashbin-delete-timestamp>1634805066</oc:trashbin-delete-timestamp>
            <oc:trashbin-delete-datetime>Thu, 21 Oct 2021 08:31:06 +0000</oc:trashbin-delete-datetime>
            <d:resourcetype>
              <d:collection/>
            </d:resourcetype>
          </d:prop>
          <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
      </d:response>
      <d:response>
        <d:href>/dav/trash-bin/einstein/283650db-79ca-4b0c-88ea-aee465dcd03a/f2/f3/</d:href>
        <d:propstat>
          <d:prop>
            <oc:trashbin-original-filename>f3</oc:trashbin-original-filename>
            <oc:trashbin-original-location>f1/f2/f3</oc:trashbin-original-location>
            <oc:trashbin-delete-timestamp>1634805066</oc:trashbin-delete-timestamp>
            <oc:trashbin-delete-datetime>Thu, 21 Oct 2021 08:31:06 +0000</oc:trashbin-delete-datetime>
            <d:resourcetype>
              <d:collection/>
            </d:resourcetype>
          </d:prop>
          <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
      </d:response>
      <d:response>
        <d:href>/dav/trash-bin/einstein/283650db-79ca-4b0c-88ea-aee465dcd03a/f2/f3/Big%20Buck%20Bunny%2060fps%204K%20-%20Official%20Blender%20Foundation%20Short%20Film-aqz-KE-bpKQ.mkv</d:href>
        <d:propstat>
          <d:prop>
            <oc:trashbin-original-filename>Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film-aqz-KE-bpKQ.mkv</oc:trashbin-original-filename>
            <oc:trashbin-original-location>f1/f2/f3/Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film-aqz-KE-bpKQ.mkv</oc:trashbin-original-location>
            <oc:trashbin-delete-timestamp>1634805066</oc:trashbin-delete-timestamp>
            <oc:trashbin-delete-datetime>Thu, 21 Oct 2021 08:31:06 +0000</oc:trashbin-delete-datetime>
            <d:resourcetype/>
            <d:getcontentlength>0</d:getcontentlength>
          </d:prop>
          <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
      </d:response>
    </d:multistatus>
    
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

    Category:DefectPriority:p3-mediumType:Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions