mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
optimize of #542
This commit is contained in:
@@ -264,8 +264,8 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
}
|
||||
|
||||
//Verifies the given path is the root or is inside the root. Prevents directory traveral.
|
||||
if($path !== $this->root && strpos(realpath($path), realpath($this->root).DIRECTORY_SEPARATOR) !== 0){
|
||||
return $stat;
|
||||
if (!$this->_inpath(realpath($path), $this->aroot)) {
|
||||
return $stat;
|
||||
}
|
||||
|
||||
if ($path != $this->root && is_link($path)) {
|
||||
|
||||
Reference in New Issue
Block a user