summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-01-21 15:04:18 +0100
committerRobin Appelman <icewind@owncloud.com>2015-01-21 15:04:18 +0100
commit04075eba6b83a71a9af17bc2cfcbdcfe31a76af2 (patch)
tree892e7e5460bea7a0c90440e29631b47defaa7424 /lib
parentff5715779c56ceacc870307bf25f4e769ff22a1a (diff)
downloadnextcloud-server-04075eba6b83a71a9af17bc2cfcbdcfe31a76af2.tar.gz
nextcloud-server-04075eba6b83a71a9af17bc2cfcbdcfe31a76af2.zip
Remove duplicated slashes from the requested url
Diffstat (limited to 'lib')
-rw-r--r--lib/private/request.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/request.php b/lib/private/request.php
index 3c33dfc340a..3bf7d94d9cf 100644
--- a/lib/private/request.php
+++ b/lib/private/request.php
@@ -278,6 +278,8 @@ class OC_Request {
$requestUri = '/' . ltrim($requestUri, '/');
}
+ $requestUri = preg_replace('%/{2,}%', '/', $requestUri);
+
// Remove the query string from REQUEST_URI
if ($pos = strpos($requestUri, '?')) {
$requestUri = substr($requestUri, 0, $pos);