Skip to content

a parent item of an exclusivly locked item can be locked exclusivly again #34358

@individual-it

Description

@individual-it

Steps to reproduce

  1. have a file structure like: /PARENT/CHILD/child.txt
  2. lock /PARENT/CHILD exclusively and depth infinity
  3. lock /PARENT exclusively and depth infinity
  4. propfind on /PARENT/CHILD/child.txt

Expected behaviour

second lock should fail
propfind should only report 1 lock

Actual behaviour

second lock works
propfind reports 2 exclusive locks

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/owncloud-core/remote.php/webdav/PARENT/CHILD/child.txt</d:href>
    <d:propstat>
      <d:prop>
        <d:lockdiscovery>
          <d:activelock>
            <d:lockscope>
              <d:exclusive/>
            </d:lockscope>
            <d:locktype>
              <d:write/>
            </d:locktype>
            <d:lockroot>
              <d:href>/owncloud-core/remote.php/webdav/PARENT</d:href>
            </d:lockroot>
            <d:depth>infinity</d:depth>
            <d:timeout>Second-1793</d:timeout>
            <d:locktoken>
              <d:href>opaquelocktoken:06e8c6ff-8db0-43ac-bf1c-eaa1137aaab3</d:href>
            </d:locktoken>
            <d:owner>uu1</d:owner>
          </d:activelock>
          <d:activelock>
            <d:lockscope>
              <d:exclusive/>
            </d:lockscope>
            <d:locktype>
              <d:write/>
            </d:locktype>
            <d:lockroot>
              <d:href>/owncloud-core/remote.php/webdav/PARENT/CHILD</d:href>
            </d:lockroot>
            <d:depth>infinity</d:depth>
            <d:timeout>Second-1774</d:timeout>
            <d:locktoken>
              <d:href>opaquelocktoken:10d8aa19-544b-43b1-a019-c23240e38389</d:href>
            </d:locktoken>
            <d:owner>uu1</d:owner>
          </d:activelock>
        </d:lockdiscovery>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions