From 66d295e65422bc3bf5044c55e5a89a14b3d8058a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 24 Nov 2022 09:45:57 +0100 Subject: [PATCH] Make sure that path is normalized and then checked, MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and not the other way around Signed-off-by: Côme Chilliet --- lib/private/Files/Node/Folder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 400fd6bedcc8b..4691247629588 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -65,10 +65,11 @@ protected function createNonExistingNode($path) { * @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; } /**