From 540d70a6fe9aa75833fc5bf6217bab814ab5c9b7 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 c8771d4e620..3aef9d00685 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -67,10 +67,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; } /**