Skip to content

Commit

Permalink
Fix XSS payload (add script into content)
Browse files Browse the repository at this point in the history
Bump version
  • Loading branch information
tsmr committed Nov 8, 2022
1 parent b5eabaa commit 4a1b30f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions inc/task.class.php
Expand Up @@ -332,9 +332,14 @@ function cleanDBonPurge() {
*/
function prepareInputForAdd($input) {


if (isset($input['due_date']) && empty($input['due_date'])) {
$input['due_date'] = 'NULL';
}
if (isset($input['content'])) {
$input['content'] = Glpi\RichText\RichText::getSafeHtml($input['content'], true);
}

if (isset($input["id"]) && ($input["id"] > 0)) {
$input["_oldID"] = $input["id"];
}
Expand Down
2 changes: 1 addition & 1 deletion inc/tasktype.class.php
Expand Up @@ -269,7 +269,7 @@ static function getKanbanColumns($ID, $column_field = null, $column_ids = [], $g
$content .= "</div>";
$rich_content = "";
if ($data['content'] != null) {
$rich_content = Glpi\RichText\RichText::getTextFromHtml($data['content'], false, true);
$rich_content = Glpi\RichText\RichText::getTextFromHtml($data['content'], false, true, true);
}
$content .= Html::resume_text($rich_content, 100);
$content .= "</div>";
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Expand Up @@ -27,7 +27,7 @@
--------------------------------------------------------------------------
*/

define('PLUGIN_TASKLISTS_VERSION', '2.0.2');
define('PLUGIN_TASKLISTS_VERSION', '2.0.3');

if (!defined("PLUGIN_TASKLISTS_DIR")) {
define("PLUGIN_TASKLISTS_DIR", Plugin::getPhpDir("tasklists"));
Expand Down
5 changes: 5 additions & 0 deletions tasklists.xml
Expand Up @@ -25,6 +25,11 @@
<author>Infotel</author>
</authors>
<versions>
<version>
<num>2.0.3</num>
<compatibility>~10.0</compatibility>
<download_url>https://github.com/InfotelGLPI/tasklists/releases/download/2.0.3/glpi-tasklists-2.0.3.tar.bz2</download_url>
</version>
<version>
<num>2.0.2</num>
<compatibility>~10.0</compatibility>
Expand Down

0 comments on commit 4a1b30f

Please sign in to comment.