Skip to content

Commit c1ba14a

Browse files
Merge pull request #35074 from nextcloud/fix/fix-path-normalizing
Make sure that path is normalized and then checked,
2 parents 66c33fd + a78595a commit c1ba14a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/private/Files/Node/Folder.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ protected function createNonExistingNode($path) {
6666
* @throws \OCP\Files\NotPermittedException
6767
*/
6868
public function getFullPath($path) {
69+
$path = $this->normalizePath($path);
6970
if (!$this->isValidPath($path)) {
7071
throw new NotPermittedException('Invalid path');
7172
}
72-
return $this->path . $this->normalizePath($path);
73+
return $this->path . $path;
7374
}
7475

7576
/**
@@ -371,12 +372,12 @@ protected function getByIdInRootMount(int $id): array {
371372

372373
return [$this->root->createNode(
373374
$absolutePath, new \OC\Files\FileInfo(
374-
$absolutePath,
375-
$mount->getStorage(),
376-
$cacheEntry->getPath(),
377-
$cacheEntry,
378-
$mount
379-
))];
375+
$absolutePath,
376+
$mount->getStorage(),
377+
$cacheEntry->getPath(),
378+
$cacheEntry,
379+
$mount
380+
))];
380381
}
381382

382383
public function getFreeSpace() {

0 commit comments

Comments
 (0)