From 0f55bff6c2385b400c893f1ac0e25e307f9d6d82 Mon Sep 17 00:00:00 2001 From: Beu Date: Mon, 14 Aug 2023 17:35:02 +0200 Subject: [PATCH] ensure to a map file name allowed by the server --- core/Maps/DirectoryBrowser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Maps/DirectoryBrowser.php b/core/Maps/DirectoryBrowser.php index 45cb620d..30a33ddb 100644 --- a/core/Maps/DirectoryBrowser.php +++ b/core/Maps/DirectoryBrowser.php @@ -506,7 +506,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { if ($filename !== null) { if ($isUtf8 && strpos($filename, "utf-8''") === 0 && $filename = substr($filename, strlen("utf-8''"))) { - $filePath = $folderPath . rawurldecode($filename); + $filePath = $folderPath . FileUtil::getClearedFileName(rawurldecode($filename)); } if (substr($filename, 0, 1) === '"' && substr($filename, -1, 1) === '"') { $filePath = $folderPath . substr($filename, 1, -1);