Skip to content
Snippets Groups Projects
Commit b08a1696 authored by Björn Schießle's avatar Björn Schießle
Browse files

normalize path to avoid problems with trailing slashes, double-slashes, etc.

parent c3823aa8
No related branches found
No related tags found
No related merge requests found
......@@ -24,12 +24,12 @@ if (isset($_GET['token'])) {
if (isset($_GET['file']) || isset($_GET['dir'])) {
if (isset($_GET['dir'])) {
$type = 'folder';
$path = $_GET['dir'];
$path = OC_Filesystem::normalizePath($_GET['dir']);
$baseDir = $path;
$dir = $baseDir;
} else {
$type = 'file';
$path = $_GET['file'];
$path = OC_Filesystem::normalizePath($_GET['file']);
}
$uidOwner = substr($path, 1, strpos($path, '/', 1) - 1);
if (OCP\User::userExists($uidOwner)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment