From 1b9c86ba1e97970d556e6e8ffd9f26d4c4c324fb Mon Sep 17 00:00:00 2001 From: joebordes Date: Mon, 18 Oct 2021 01:41:59 +0200 Subject: [PATCH] sec(Calendar) XSS in Subject of To Dos. https://huntr.dev/bounties/bc19b4db-6491-411d-bf58-76e40d18639e --- Smarty/templates/Buttons_List.tpl | 2 +- include/utils/utils.php | 4 +++- modules/cbCalendar/ActivityReminderCallbackAjax.php | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Smarty/templates/Buttons_List.tpl b/Smarty/templates/Buttons_List.tpl index 7ae6a6bb23..3c1d449b11 100644 --- a/Smarty/templates/Buttons_List.tpl +++ b/Smarty/templates/Buttons_List.tpl @@ -63,7 +63,7 @@ {if !empty($isDetailView) || !empty($isEditView)} [ {$TITLEPREFIX} ] - {$MODULELABEL|textlength_check} + {$MODULELABEL} {else} assign('TASKItemRead', $ACTIVITY['cbreaded']); $smarty->assign('TASKImage', $ACTIVITY['activityimage']); $smarty->assign('TASKType', $ACTIVITY['activitytype']); - $smarty->assign('TASKTitle', $ACTIVITY['cbsubject']); - $smarty->assign('TASKSubtitle', $ACTIVITY['activitytype'].' - '.$ACTIVITY['cbstatus']); - $smarty->assign('TASKSubtitleColor', $ACTIVITY['cbcolor']); - $smarty->assign('TASKStatus', $ACTIVITY['cbdate'].' '.$ACTIVITY['cbtime']); + $smarty->assign('TASKTitle', vtlib_purify($ACTIVITY['cbsubject'])); + $smarty->assign('TASKSubtitle', vtlib_purify($ACTIVITY['activitytype'].' - '.$ACTIVITY['cbstatus'])); + $smarty->assign('TASKSubtitleColor', vtlib_purify($ACTIVITY['cbcolor'])); + $smarty->assign('TASKStatus', vtlib_purify($ACTIVITY['cbdate'].' '.$ACTIVITY['cbtime'])); $actions = array(); $actions[getTranslatedString('LBL_VIEW', 'Settings')] = array( 'type' => 'link',