owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.38k stars 181 forks source link

Lost permission when received multiple shares on the same resource #8464

Open rhafer opened 7 months ago

rhafer commented 7 months ago

Describe the bug

see attached video:

Screencast_20240215_153045-1.webm

I think the bug is in the sharestorageprovider, it only the permissions on the single share which the upload was tried on(https://github.com/cs3org/reva/blob/edge/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go#L243). But there might be more shares for the same resource giving different permissions.

Ideally we would not need to do that check in the sharestorageprovider and just forward the request to the "real" storageprovider. It should deal with it accordingly.

nirajacharya2 commented 7 months ago

i am not getting that error in the latest master

Screencast from 21-2-24 03:01:19 अपराह्न +0545.webm

ocis build ownCloud Web UI 8.0.0-rc.5 Infinite Scale 5.1.0-prealpha+5a7d498e67 Community

rhafer commented 7 months ago

i am not getting that error in the latest master

Yeah, it does not happen all the time. I guess you've been lucky.

grgprarup commented 7 months ago

i am not getting that error in the latest master

Screencast.from.21-2-24.03.01.19.+0545.webm ocis build ownCloud Web UI 8.0.0-rc.5 Infinite Scale 5.1.0-prealpha+5a7d498e67 Community

The issue exists as mentioned by @rhafer but the error message is changed on UI.

Screencast from 2024-02-26 14-42-01.webm

Test environment setup: ownCloud Web UI 8.0.0-rc.5 Infinite Scale 5.1.0-prealpha+e55d17e9f Community (latest master)

Response:

<d:error
    xmlns:d="DAV"
    xmlns:s="http://sabredav.org/ns">
    <s:exception>Sabre\DAV\Exception\Forbidden</s:exception>
    <s:message>share does not grant InitiateFileDownload permission</s:message>
</d:error>
phil-davis commented 3 months ago

Note: this issue is blocking #8576 which tries to add some tests.