[VD:LocalFileSystem] fix #1910 startPath dose not work currently

This commit is contained in:
nao-pon
2017-02-24 12:02:35 +09:00
parent 812b920b46
commit 78c36ff2bf
+3 -1
View File
@@ -95,7 +95,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
}
$this->root = $this->getFullPath($this->root, $cwd);
if (!empty($this->options['startPath'])) {
$this->options['startPath'] = $this->getFullPath($this->options['startPath'], $cwd);
$this->options['startPath'] = $this->getFullPath($this->options['startPath'], $this->root);
}
if (is_null($this->options['syncChkAsTs'])) {
@@ -442,11 +442,13 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
$stat = array();
if (!file_exists($path) && !is_link($path)) {
debug($path);
return $stat;
}
//Verifies the given path is the root or is inside the root. Prevents directory traveral.
if (!$this->_inpath($path, $this->root)) {
debug($path, $this->root);
return $stat;
}