mirror of https://github.com/nextcloud/server
Merge pull request #35074 from nextcloud/fix/fix-path-normalizing
Make sure that path is normalized and then checked,
This commit is contained in:
commit
c1ba14ad00
|
@ -66,10 +66,11 @@ class Folder extends Node implements \OCP\Files\Folder {
|
|||
* @throws \OCP\Files\NotPermittedException
|
||||
*/
|
||||
public function getFullPath($path) {
|
||||
$path = $this->normalizePath($path);
|
||||
if (!$this->isValidPath($path)) {
|
||||
throw new NotPermittedException('Invalid path');
|
||||
}
|
||||
return $this->path . $this->normalizePath($path);
|
||||
return $this->path . $path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -371,12 +372,12 @@ class Folder extends Node implements \OCP\Files\Folder {
|
|||
|
||||
return [$this->root->createNode(
|
||||
$absolutePath, new \OC\Files\FileInfo(
|
||||
$absolutePath,
|
||||
$mount->getStorage(),
|
||||
$cacheEntry->getPath(),
|
||||
$cacheEntry,
|
||||
$mount
|
||||
))];
|
||||
$absolutePath,
|
||||
$mount->getStorage(),
|
||||
$cacheEntry->getPath(),
|
||||
$cacheEntry,
|
||||
$mount
|
||||
))];
|
||||
}
|
||||
|
||||
public function getFreeSpace() {
|
||||
|
|
Loading…
Reference in New Issue