From f7e66d49fc4e374071d60109337f47d2d102b53a Mon Sep 17 00:00:00 2001 From: Individual IT Services Date: Mon, 14 Sep 2015 10:42:00 +0545 Subject: [PATCH] allow ".." in folder names ".." are valid in folder names, only ".." by itself is invalid fix for #18987 --- apps/files/ajax/upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 4bc2ce8bdf..7ff02d8db8 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -148,7 +148,7 @@ if ($maxUploadFileSize >= 0 and $totalSize > $maxUploadFileSize) { } $result = array(); -if (strpos($dir, '..') === false) { +if (\OC\Files\Filesystem::isValidPath($dir) === true) { $fileCount = count($files['name']); for ($i = 0; $i < $fileCount; $i++) {