[QA] more errors with extra slashes in URI
Open
Nobody has claimed this yet.
QA:team
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
Seen while testing https://github.com/owncloud/core/issues/34365 with 10.11.0-beta.1
The following cases are fixed since #40216:
curl -u admin:admin http://localhost//remote.php//dav/files/admin/test.txt# double slashes at startcurl -u admin:admin http://localhost//remote.php//dav//files//admin//test.txt# double slashes everywherecurl -u admin:admin http://localhost////remote.php//dav/files/admin/test.txt# many slashes at start
This still explodes
curl -u admin:admin http://localhost/remote.php///dav/files/admin/test.txt# many slashes after remote.php
< HTTP/1.1 500 Internal Server Error
< Date: Tue, 06 Sep 2022 07:17:11 GMT
< Server: Apache/2.4.41 (Ubuntu)
...
< Content-Length: 270
< Connection: close
< Content-Type: application/xml; charset=utf-8
<
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>LogicException</s:exception>
<s:message>Requested uri (/remote.php///dav/files/admin/test.txt) is out of base uri (/remote.php/dav/)</s:message>
</d:error>
Expected behaviour:
- redundant slashes are harmless.
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
Start by reproducing the failing curl request against /remote.php///dav/files/admin/test.txt and compare it with the cases fixed by #40216. Trace how the remote.php and DAV base URIs are parsed, then verify that redundant slashes after remote.php no longer produce a 500 response and that the existing cases remain working.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100