diff --git a/pages/csvimport.php b/pages/csvimport.php index 9f4b566a2..a8ce680f6 100644 --- a/pages/csvimport.php +++ b/pages/csvimport.php @@ -197,6 +197,11 @@ try { throw new CoreException(Dict::S('UI:ActionNotAllowed')); } + // CSRF transaction id verification + if(!$bSimulate && !utils::IsTransactionValid(utils::ReadPostedParam('transaction_id', '', 'raw_data'))){ + throw new CoreException(Dict::S('UI:Error:InvalidToken')); + } + $aResult = array(); $sCSVData = utils::ReadParam('csvdata', '', false, 'raw_data'); $sCSVDataTruncated = utils::ReadParam('csvdata_truncated', '', false, 'raw_data'); @@ -487,11 +492,12 @@ try { $sHtml .= "$sMessage"; $sHtml .= ''; } - + $iUnchanged = count($aRes) - $iErrors - $iModified - $iCreated; $sHtml .= ''; $oPage->add('
'); $oPage->add('
'); + $oPage->add(''); $oPage->add(''); $oPage->add(''); $oPage->add('');