Skip to content

OCS receiving multiple shares from the same source #8080

Closed

Description

@fschade

Describe the bug

receiving the same resource multiple times leads to a propfind which contains the same item multiple times

Steps to reproduce

  1. create a folder A (all from the web ui)
  2. share the A folder to marie
  3. share the A folder to physics lovers
  4. send a propfind (as marie) to the share jail, e.g. https://srV.tld/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668

Response

<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
    <d:response>
        <d:href>/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668%21a0ca6a90-a365-4782-871e-d44447bbc668/</d:href>
        <d:propstat>
            <d:prop>
                <oc:id>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668</oc:id>
                <oc:fileid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!a0ca6a90-a365-4782-871e-d44447bbc668</oc:fileid>
                <oc:spaceid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668</oc:spaceid>
                <oc:shareid>a0ca6a90-a365-4782-871e-d44447bbc668</oc:shareid>
                <d:getetag>"3e93733606de3918147ed0794c831af4"</d:getetag>
                <oc:permissions></oc:permissions>
                <d:resourcetype>
                    <d:collection/>
                </d:resourcetype>
                <oc:size>0</oc:size>
                <d:getlastmodified>Thu, 28 Dec 2023 09:38:47 GMT</d:getlastmodified>
                <oc:favorite>0</oc:favorite>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
        <d:propstat>
            <d:prop>
                <oc:file-parent></oc:file-parent>
            </d:prop>
            <d:status>HTTP/1.1 404 Not Found</d:status>
        </d:propstat>
    </d:response>
    <d:response>
        <d:href>/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668%21a0ca6a90-a365-4782-871e-d44447bbc668/A/</d:href>
        <d:propstat>
            <d:prop>
                <oc:id>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!ce2ad9db-a9c1-4916-8bb5-a3e4b7a65dff:05e3db26-be0e-48a8-ba47-81e3a5cf504b:40ddbf9d-2bd1-4ef2-91b0-6eac1c30b68f</oc:id>
                <oc:fileid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!ce2ad9db-a9c1-4916-8bb5-a3e4b7a65dff:05e3db26-be0e-48a8-ba47-81e3a5cf504b:40ddbf9d-2bd1-4ef2-91b0-6eac1c30b68f</oc:fileid>
                <oc:spaceid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668</oc:spaceid>
                <oc:file-parent>ce2ad9db-a9c1-4916-8bb5-a3e4b7a65dff$05e3db26-be0e-48a8-ba47-81e3a5cf504b!05e3db26-be0e-48a8-ba47-81e3a5cf504b</oc:file-parent>
                <oc:shareid>a0ca6a90-a365-4782-871e-d44447bbc668</oc:shareid>
                <oc:name>A</oc:name>
                <d:displayname>A</d:displayname>
                <d:getetag>"3e93733606de3918147ed0794c831af4"</d:getetag>
                <oc:permissions>SR</oc:permissions>
                <d:resourcetype>
                    <d:collection/>
                </d:resourcetype>
                <oc:size>0</oc:size>
                <d:getlastmodified>Thu, 28 Dec 2023 09:38:47 GMT</d:getlastmodified>
                <oc:tags></oc:tags>
                <oc:favorite>0</oc:favorite>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
        <d:propstat>
            <d:prop>
                <oc:audio></oc:audio>
                <oc:location></oc:location>
            </d:prop>
            <d:status>HTTP/1.1 404 Not Found</d:status>
        </d:propstat>
    </d:response>
    <d:response>
        <d:href>/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668%21a0ca6a90-a365-4782-871e-d44447bbc668/A/</d:href>
        <d:propstat>
            <d:prop>
                <oc:id>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!ce2ad9db-a9c1-4916-8bb5-a3e4b7a65dff:05e3db26-be0e-48a8-ba47-81e3a5cf504b:86c9bae2-151d-450c-93c3-fb94f04d181e</oc:id>
                <oc:fileid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!ce2ad9db-a9c1-4916-8bb5-a3e4b7a65dff:05e3db26-be0e-48a8-ba47-81e3a5cf504b:86c9bae2-151d-450c-93c3-fb94f04d181e</oc:fileid>
                <oc:spaceid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668</oc:spaceid>
                <oc:file-parent>ce2ad9db-a9c1-4916-8bb5-a3e4b7a65dff$05e3db26-be0e-48a8-ba47-81e3a5cf504b!05e3db26-be0e-48a8-ba47-81e3a5cf504b</oc:file-parent>
                <oc:shareid>a0ca6a90-a365-4782-871e-d44447bbc668</oc:shareid>
                <oc:name>A</oc:name>
                <d:displayname>A</d:displayname>
                <d:getetag>"3e93733606de3918147ed0794c831af4"</d:getetag>
                <oc:permissions>SR</oc:permissions>
                <d:resourcetype>
                    <d:collection/>
                </d:resourcetype>
                <oc:size>0</oc:size>
                <d:getlastmodified>Thu, 28 Dec 2023 09:38:47 GMT</d:getlastmodified>
                <oc:tags></oc:tags>
                <oc:favorite>0</oc:favorite>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
        <d:propstat>
            <d:prop>
                <oc:audio></oc:audio>
                <oc:location></oc:location>
            </d:prop>
            <d:status>HTTP/1.1 404 Not Found</d:status>
        </d:propstat>
    </d:response>
</d:multistatus>

Expected behavior

implicit href de-duplication

  • /dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668%21a0ca6a90-a365-4782-871e-d44447bbc668/A-1/
  • /dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668%21a0ca6a90-a365-4782-871e-d44447bbc668/A-2/

Actual behavior

duplicated name

  • /dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668%21a0ca6a90-a365-4782-871e-d44447bbc668/A/
  • /dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668%21a0ca6a90-a365-4782-871e-d44447bbc668/A/

Activity

  1. individual-it commented on Jan 17, 2024

    @individual-it
    Member

    disabling sync will make one of the resources disappear, but not both. See #8232

  2. micbar commented on Jan 17, 2024

    @micbar
    Contributor

    This seems to be a bug during auto accept.

    before the auto accept it was deduplicating the resources when accepting.

    @butonic @aduffeck @kobergj needs a bugfix.

  3. rhafer commented on Feb 13, 2024

    @rhafer
    Contributor

    I came across this when looking into #8420.

    I don't think this is related auto-accept in any way. It's the same behavior in stable-4.0 which does not have the auto-accept feature.
    Also issue this is about receiving the same shared item twice (via direct and group share). AFAICT we should not de-duplicate the shares by giving them different names in this case. If any we should collapse both shares into a single <prop>.

    The deduplication of the names is only needed when receiving shares for different items that have the same name. That still works as expected.

  4. individual-it commented on Feb 14, 2024

    @individual-it
    Member

    agree, issue will be same if done by auto-accept or manual accept
    also agree on the naming, if its actually the same resource it should be visible only once by webDAV PROPFIND

  5. self-assigned this
    on Feb 14, 2024
  6. added a commit that references this issue on Feb 21, 2024
    f29767e
  7. added a commit that references this issue on Feb 21, 2024
    b6fea0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions