ensure to a map file name allowed by the server

This commit is contained in:
Beu 2023-08-14 17:35:02 +02:00
parent d947337c9c
commit 0f55bff6c2

View File

@ -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);