diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-11-10 18:50:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 18:50:18 +0100 |
commit | c1ba14ad00cc751f1e5aed4794b7f673462d0a00 (patch) | |
tree | 9d9cf078162fe9062ae053b19999192df8a514b0 | |
parent | 66c33fd9b8e21dee5332ea8df8b9b4b718709711 (diff) | |
parent | a78595a45f5df29531205c5985ac6300c3094c6f (diff) | |
download | nextcloud-server-c1ba14ad00cc751f1e5aed4794b7f673462d0a00.tar.gz nextcloud-server-c1ba14ad00cc751f1e5aed4794b7f673462d0a00.zip |
Merge pull request #35074 from nextcloud/fix/fix-path-normalizing
Make sure that path is normalized and then checked,
-rw-r--r-- | lib/private/Files/Node/Folder.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 268c1d8dd06..bf9ae3c148d 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -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() { |