добавлена фильтрация имени файла при загрузке

This commit is contained in:
rsgrinko committed 2023-09-04 14:33:24 +00:00
1 parent f2e72e2a30
commit 1fa7ff7949
1 file changed
+1 -1
+1 -1
View File
@@ -204,7 +204,7 @@
throw new CoreException('Не удалось скопировать файл', CoreException::ERROR_FILE_COPY);
}
}
$this->name = $fileName;
$this->name = mysql_escape_string(htmlspecialchars(striptags(trim($fileName))));
$this->path = self::FOLDER . '/' . $storageFileName;
$this->id = $this->DB->addItem(self::TABLE, ['name' => $this->name, 'path' => $this->path]);