From 1fa7ff794945aedfd5c7091b25b909cd8ded411d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=BE=D0=BC=D0=B0=D0=BD=20=D0=93=D1=80=D0=B8=D0=BD?= =?UTF-8?q?=D1=8C=D0=BA=D0=BE?= Date: Mon, 4 Sep 2023 14:33:24 +0000 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=B3?= =?UTF-8?q?=D1=80=D1=83=D0=B7=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/lib/Core/Models/File.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/Core/Models/File.class.php b/core/lib/Core/Models/File.class.php index 9ab3ac6..981840a 100644 --- a/core/lib/Core/Models/File.class.php +++ b/core/lib/Core/Models/File.class.php @@ -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]);