core icon indicating copy to clipboard operation
core copied to clipboard

[QA] more errors with extra slashes in URI

Open jnweiger opened this issue 2 years ago • 2 comments

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 start
  • curl -u admin:admin http://localhost//remote.php//dav//files//admin//test.txt # double slashes everywhere
  • curl -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.

jnweiger avatar Sep 06 '22 07:09 jnweiger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 06 '23 01:03 github-actions[bot]

This issue has been automatically closed.

github-actions[bot] avatar Mar 17 '23 01:03 github-actions[bot]