Resource with share permission `create` is readable for sharee
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 274
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 103
Description
## Describe the bug
The shared resources with permission created should not exist for sharee because he only has "create" permission, not "read"
## Steps to reproduce
Steps to reproduce the behavior:
1. User `Alice` creates a folder `shared`
2. `Alice` shares folder `shared` to user `Brian` with permission `create only`
3. `Brian` accepts shares and uploads file `core.png` inside the shared folder `shared`
4. `Brian` send HTTP PROPFIND request
```
curl -u Brian:1234 -X PROPFIND https://host.docker.internal:9200/remote.php/webdav/Shares/shared/core.png -vk | xmllint --format -
```
## Expected behavior
In response, the HTTP status code should be `404` (same as core)
## Actual behavior
```
< HTTP/1.1 207 Multi-Status
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: Tus-Resumable, Tus-Version, Tus-Extension
< Content-Length: 1094
< Content-Security-Policy: default-src 'none';
< Content-Type: application/xml; charset=utf-8
< Date: Wed, 07 Sep 2022 07:08:35 GMT
< Dav: 1, 3, extended-mkcol
< Tus-Extension: creation,creation-with-upload,checksum,expiration
< Tus-Resumable: 1.0.0
< Tus-Version: 1.0.0
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< X-Permitted-Cross-Domain-Policies: none
< X-Robots-Tag: none
< X-Xss-Protection: 1; mode=block
<
{ [581 bytes data]
100 1094 100 1094 0 0 3236 0 --:--:-- --:--:-- --:--:-- 3236
* Connection #0 to host host.docker.internal left intact
/remote.php/webdav/Shares/shared/core.png
1284d238-aa92-42ce-bdc4-0b0000009157$some-admin-user-id-0000-000000000000!9977423f-ba16-4f8c-b561-f1dcd35ab219
1284d238-aa92-42ce-bdc4-0b0000009157$some-admin-user-id-0000-000000000000!9977423f-ba16-4f8c-b561-f1dcd35ab219
some-admin-user-id-0000-000000000000
core.png
"8e31514978348374e0e3d085d1eb6a5a"
67766
image/png
Wed, 07 Sep 2022 06:15:22 GMT
SHA1:48436aa47a4a476fd27281d082e83cea6e208a31 MD5:12886fefa307e93c8f058220415534e1 ADLER32:85bb693d
0
HTTP/1.1 200 OK
```
Contributor guide
Assessment
This issue has not been assessed yet.