Merge pull request #1436 from owncloud/cache_check_path
Cache: check for invalid paths in getFileInfo/getDirectoryContent
This commit is contained in:
commit
814369e0cd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue