Skip to content

Commit

Permalink
[VD:LocalFileSystem] fix #1910 startPath dose not work currently
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Feb 24, 2017
1 parent 812b920 commit 78c36ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion php/elFinderVolumeLocalFileSystem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function init() {
}
$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'])) {
Expand Down Expand Up @@ -442,11 +442,13 @@ protected function _stat($path) {
$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;
}

Expand Down

0 comments on commit 78c36ff

Please sign in to comment.