summaryrefslogtreecommitdiffstats
path: root/lib/files
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-04 05:51:34 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-04 05:51:34 -0800
commit814369e0cdc9b1d44344f25cc95a7236d25426eb (patch)
tree92f3254f8a768f047b19b9f91a484a662238553b /lib/files
parentf7258cc5e8f10916e78d2b10d18f1cd2fb9ddbca (diff)
parent7c33d0a5a763be92c7e6dbf526484ef372c7111f (diff)
downloadnextcloud-server-814369e0cdc9b1d44344f25cc95a7236d25426eb.tar.gz
nextcloud-server-814369e0cdc9b1d44344f25cc95a7236d25426eb.zip
Merge pull request #1436 from owncloud/cache_check_path
Cache: check for invalid paths in getFileInfo/getDirectoryContent
Diffstat (limited to 'lib/files')
-rw-r--r--lib/files/view.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/files/view.php b/lib/files/view.php
index a002ad5040d..dfcb770328b 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -670,6 +670,9 @@ class View {
*/
public function getFileInfo($path) {
$data = array();
+ if (!Filesystem::isValidPath($path)) {
+ return $data;
+ }
$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
/**
* @var \OC\Files\Storage\Storage $storage
@@ -724,6 +727,9 @@ class View {
*/
public function getDirectoryContent($directory, $mimetype_filter = '') {
$result = array();
+ if (!Filesystem::isValidPath($directory)) {
+ return $result;
+ }
$path = Filesystem::normalizePath($this->fakeRoot . '/' . $directory);
/**
* @var \OC\Files\Storage\Storage $storage