HTTP status should be 415(Unsupported Media Type) for `MOVE, DELETE, COPY` request with body
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
Steps to reproduce
- Create user
uu1 - Create a file
test.txt - Send
MOVErequest fortest.txtwith the body using curl
curl -ks -u uu1:uu1 -XMOVE -H "DESTINATION: http://localhost/core/remote.php/webdav/test2.txt" --data "doesnotmatter" http://localhost/core/remote.php/webdav/test.txt
curl -ks -u uu1:uu1 -XMOVE -H "DESTINATION: http://localhost/core/remote.php/dav/files/uu1/test2.txt" --data "doesnotmatter" http://localhost/core/remote.php/dav/files/uu1/test.txt
Expected behaviour
webDAV DELETE, COPY or MOVE requests should not send a body in the request. If a body is sent, then the server is supposed to return HTTP status 415 (Unsupported Media Type):
https://datatracker.ietf.org/doc/html/rfc4918#section-8.4
In oCIS: HTTP/1.1 415 Unsupported Media Type
Actual behaviour
In oC10: HTTP/1.1 403 Forbidden
https://drone.owncloud.com/owncloud/core/36451/51/13#:~:text=Scenario%3A%20send%20MOVE%20requests%20to%20webDav%20endpoints%20with,470
Server configuration
Operating system: Ubuntu 20.04 LTS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided curl commands against the WebDAV endpoints and compare the response for MOVE, DELETE, and COPY requests carrying a body. Consult RFC 4918 section 8.4 and trace the request handling until the response status is selected; done means these requests return HTTP 415 Unsupported Media Type rather than 403 Forbidden.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100