owncloud / owncloud/ocis

Trying to delete other user's trashbin item returns 409 for `spaces` path instead of 404

Open
#9,791 0 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 2h
Merged PRs (30d)
106

Description

## Steps to reproduce
1. as `admin`, delete file `lorem.txt`
2. as `demo`, try to delete the trashbin item using `admin`'s trashbin path

```bash
curl -XDELETE 'https://localhost:9200/remote.php/dav/spaces/trash-bin/{admin-space-id}/12d3a18f-71bc-4f20-a1b6-e917c8d54ace' \
-udemo:demo -vk
```
```xml
< HTTP/1.1 409 Conflict



Sabre\DAV\Exception\Conflict
path 12d3a18f-71bc-4f20-a1b6-e917c8d54ace not found


```

With `new` dav path:

```bash
curl -XDELETE 'https://localhost:9200/remote.php/dav/trash-bin/admin/12d3a18f-71bc-4f20-a1b6-e917c8d54ace' \
-udemo:demo -vk
```
```xml
< HTTP/1.1 404 Not Found

Sabre\DAV\Exception\NotFound
not found

```
## Expected behavior
`404` similar to `new` dav path

## Actual behavior
409 Conflict

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.