добавлена фильтрация имени файла при загрузке
This commit is contained in:
1 file changed
+1
-1
@@ -204,7 +204,7 @@
|
|||||||
throw new CoreException('Не удалось скопировать файл', CoreException::ERROR_FILE_COPY);
|
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->path = self::FOLDER . '/' . $storageFileName;
|
||||||
|
|
||||||
$this->id = $this->DB->addItem(self::TABLE, ['name' => $this->name, 'path' => $this->path]);
|
$this->id = $this->DB->addItem(self::TABLE, ['name' => $this->name, 'path' => $this->path]);
|
||||||
|
|||||||
Reference in new issue
Block a user