From 0b7471e3df52c6c285c74beeb8cd1c3a8c9b1e02 Mon Sep 17 00:00:00 2001 From: Daniele <1950630+vtenext-dan@users.noreply.github.com> Date: Tue, 10 Aug 2021 09:40:32 +0200 Subject: [PATCH] TTTT228766 - Security Fix --- Smarty/templates/ComposeEmail.tpl | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Smarty/templates/ComposeEmail.tpl b/Smarty/templates/ComposeEmail.tpl index 656302c..d3ca19d 100644 --- a/Smarty/templates/ComposeEmail.tpl +++ b/Smarty/templates/ComposeEmail.tpl @@ -64,15 +64,15 @@ {if !empty($smarty.request.message)} - - + {* crmv@211287 *} + {* crmv@211287 *} {/if} {* crmv@2043m *} {if $smarty.request.reply_mail_converter neq ''} - - - + {* crmv@211287 *} + {* crmv@211287 *} + {* crmv@211287 *} {/if} {* crmv@2043me *} {* crmv@62394 - activity tracking inputs *} @@ -280,7 +280,6 @@ {* crmv@204525 *} - {* crmv@121575e *} {/foreach} @@ -482,6 +481,14 @@ jQuery(document).ready(function() {ldelim} }); }, FileUploaded: function(up, file, info) { + // crmv@228766 + var response = JSON.parse(info.response); + if(response.hasOwnProperty('error')){ + vtealert(response.error.message); + up.removeFile(file); + } + // crmv@228766e + // Called when a file has finished uploading jQuery('.plupload_buttons').show(); jQuery('.plupload_upload_status').hide(); @@ -519,7 +526,7 @@ jQuery(document).ready(function() {ldelim} jQuery.ajax({ url: 'index.php', method: 'POST', - data: "module=Documents&action=DocumentsAjax&file=EmailFile&record={/literal}{$smarty.request.rec}{literal}", + data: "module=Documents&action=DocumentsAjax&file=EmailFile&record={/literal}{$smarty.request.rec|@vtlib_purify|escape:'quotes'}{literal}",//crmv@211287 success: function(result) { } }); @@ -689,4 +696,4 @@ function remove_attach(self) { {/literal} - \ No newline at end of file +