Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROPFIND on Shares drive and on shared resource contains different value for <oc:fileid> #8766

Closed
PrajwolAmatya opened this issue Apr 3, 2024 · 1 comment

Comments

@PrajwolAmatya
Copy link
Contributor

Describe the bug

When share receiver sends a PROPFIND response on Shares drive, <oc:fileid> returned in the response contains shareMountId, and when sends a PROPFIND response to resource, <oc:fileid> returned in the response contains resourceId. Does the <oc:fileid> of shared resource in both cases supposed to be different or should it be same?

Steps to reproduce

  1. Alice uploads a folder folderToShare
  2. Alice shares folder with Brian
  3. Brian sends PROPFIND request on Shares drive:
curl -XPROPFIND https://localhost:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668 -u brian:1234
  1. Brian sends PROPFIND request on shared resource:
curl -XPROPFIND https://localhost:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668/folderToShare -u brian:1234

Expected behavior

Is it supposed to have different oc:fileid for shared resource folderToShare in the two cases?

Actual behavior

Case 1: PROPFIND to Shares drive:

curl -XPROPFIND https://localhost:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668 -u brian:1234

Response: the <oc:fileid> contains the shareMountId of shared resource folderToShare

<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$a0ca6a90-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></oc:shareid>
                <d:getetag>"2e8a08a3f46444a3aa0a518a1141ace4"</d:getetag>
                <oc:permissions></oc:permissions>
                <d:resourcetype>
                    <d:collection/>
                </d:resourcetype>
                <oc:size>0</oc:size>
                <d:getlastmodified>Wed, 03 Apr 2024 07:21:15 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$a0ca6a90-a365-4782-871e-d44447bbc668/folderToShare/</d:href>
        <d:propstat>
            <d:prop>
                <oc:id>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!6257d768-b9d8-4036-989a-7e838e181619:e8b2d809-d3d5-49f5-b104-869494595ea3:e76484a0-7f83-4305-84a5-9c41eabb2e14</oc:id>
                <oc:fileid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!6257d768-b9d8-4036-989a-7e838e181619:e8b2d809-d3d5-49f5-b104-869494595ea3:e76484a0-7f83-4305-84a5-9c41eabb2e14</oc:fileid>
                <oc:spaceid>a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668</oc:spaceid>
                <oc:file-parent>6257d768-b9d8-4036-989a-7e838e181619$e8b2d809-d3d5-49f5-b104-869494595ea3!e8b2d809-d3d5-49f5-b104-869494595ea3</oc:file-parent>
                <oc:shareid></oc:shareid>
                <oc:name>folderToShare</oc:name>
                <d:displayname>folderToShare</d:displayname>
                <d:getetag>"2e8a08a3f46444a3aa0a518a1141ace4"</d:getetag>
                <oc:permissions>S</oc:permissions>
                <d:resourcetype>
                    <d:collection/>
                </d:resourcetype>
                <oc:size>0</oc:size>
                <d:getlastmodified>Wed, 03 Apr 2024 07:21:15 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>

Case 2: PROPFIND to Shared resource folderToShare

curl -XPROPFIND https://localhost:9200/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668/folderToShare -u brian:1234

Response: the <oc:fileid> contains the resource id

<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$a0ca6a90-a365-4782-871e-d44447bbc668/folderToShare/</d:href>
        <d:propstat>
            <d:prop>
                <oc:id>6257d768-b9d8-4036-989a-7e838e181619$e8b2d809-d3d5-49f5-b104-869494595ea3!dcdee2cb-b535-4bf7-8d63-7cfc1ab0e6dd</oc:id>
                <oc:fileid>6257d768-b9d8-4036-989a-7e838e181619$e8b2d809-d3d5-49f5-b104-869494595ea3!dcdee2cb-b535-4bf7-8d63-7cfc1ab0e6dd</oc:fileid>
                <oc:spaceid>6257d768-b9d8-4036-989a-7e838e181619$e8b2d809-d3d5-49f5-b104-869494595ea3</oc:spaceid>
                <oc:file-parent>6257d768-b9d8-4036-989a-7e838e181619$e8b2d809-d3d5-49f5-b104-869494595ea3!e8b2d809-d3d5-49f5-b104-869494595ea3</oc:file-parent>
                <oc:shareid></oc:shareid>
                <oc:name>folderToShare</oc:name>
                <d:displayname>folderToShare</d:displayname>
                <d:getetag>"2e8a08a3f46444a3aa0a518a1141ace4"</d:getetag>
                <oc:permissions>S</oc:permissions>
                <d:resourcetype>
                    <d:collection/>
                </d:resourcetype>
                <oc:size>0</oc:size>
                <d:getlastmodified>Wed, 03 Apr 2024 07:21:15 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>

CC. @rhafer

@rhafer
Copy link
Contributor

rhafer commented Apr 3, 2024

This seems to be duplicate of #8455 so I am closing it in favor of the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants