diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-02-03 23:34:27 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-02-03 23:34:27 +0100 |
commit | 80dd8d7802f90ce088b03e46d62e12367dcad278 (patch) | |
tree | 19012a3f2198e8176f11dd72974d8c6724d21594 /lib/files/view.php | |
parent | 561e6c4c5be0bcbc837fb983daabd3e91f8a4150 (diff) | |
download | nextcloud-server-80dd8d7802f90ce088b03e46d62e12367dcad278.tar.gz nextcloud-server-80dd8d7802f90ce088b03e46d62e12367dcad278.zip |
Cache: check for invalid paths in getFileInfo/getDirectoryContent
Diffstat (limited to 'lib/files/view.php')
-rw-r--r-- | lib/files/view.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/files/view.php b/lib/files/view.php index 302232b5134..ff94d3e602b 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($path)) { + return $data; + } $path = Filesystem::normalizePath($this->fakeRoot . '/' . $directory); /** * @var \OC\Files\Storage\Storage $storage |