From 54f6fd784e4ca36ced842b81e9d8651a0b1de2a9 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 16 Nov 2020 19:06:16 +1100 Subject: [PATCH 01/10] security/core#100 Escape uploaded data to prevent Reflected Cross site scripting from uploaded CSVs --- templates/CRM/Activity/Import/Form/MapTable.tpl | 2 +- templates/CRM/Contact/Import/Form/MapTable.tpl | 2 +- templates/CRM/Contribute/Import/Form/MapTable.tpl | 2 +- templates/CRM/Event/Import/Form/MapTable.tpl | 2 +- templates/CRM/Member/Import/Form/MapTable.tpl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/CRM/Activity/Import/Form/MapTable.tpl b/templates/CRM/Activity/Import/Form/MapTable.tpl index 626a37948fc0..6ecd9c181db0 100644 --- a/templates/CRM/Activity/Import/Form/MapTable.tpl +++ b/templates/CRM/Activity/Import/Form/MapTable.tpl @@ -39,7 +39,7 @@ {section name=rows loop=$rowDisplayCount} {assign var="j" value=$smarty.section.rows.index} - {$dataValues[$j][$i]} + {$dataValues[$j][$i]|escape} {/section} {* Display mapper field for 'Map Fields', and mapper value for 'Preview' *} diff --git a/templates/CRM/Contribute/Import/Form/MapTable.tpl b/templates/CRM/Contribute/Import/Form/MapTable.tpl index ad14bd8ae12b..4c6909d271af 100644 --- a/templates/CRM/Contribute/Import/Form/MapTable.tpl +++ b/templates/CRM/Contribute/Import/Form/MapTable.tpl @@ -38,7 +38,7 @@ {section name=rows loop=$rowDisplayCount} {assign var="j" value=$smarty.section.rows.index} - {$dataValues[$j][$i]} + {$dataValues[$j][$i]|escape} {/section} {* Display mapper field for 'Map Fields', and mapper value for 'Preview' *} diff --git a/templates/CRM/Member/Import/Form/MapTable.tpl b/templates/CRM/Member/Import/Form/MapTable.tpl index 927ba7ceea89..0a3dfec5ae28 100644 --- a/templates/CRM/Member/Import/Form/MapTable.tpl +++ b/templates/CRM/Member/Import/Form/MapTable.tpl @@ -38,7 +38,7 @@ {section name=rows loop=$rowDisplayCount} {assign var="j" value=$smarty.section.rows.index} - {$dataValues[$j][$i]} + {$dataValues[$j][$i]|escape} {/section} {* Display mapper