diff --git a/ChangeLog b/ChangeLog index 45434aff0..fd1f3615b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2021-11-16 Franz Holzinger + * bugfix: Error case with wrong product uid in string form must show correct HTML formatted output. + 2021-10-26 Franz Holzinger * bugfix compatibility TYPO3 10.4: FAL must always be used for TYPO3 10, no matter what has been configured for tt_products. diff --git a/control/class.tx_ttproducts_main.php b/control/class.tx_ttproducts_main.php index f2a876185..744ecc761 100644 --- a/control/class.tx_ttproducts_main.php +++ b/control/class.tx_ttproducts_main.php @@ -132,6 +132,7 @@ public function init (&$content, &$conf, &$config, $pibaseClass, &$errorCode, $b // Save the original flexform in case if we need it later as USER_INT $this->cObj->data['_original_pi_flexform'] = $this->cObj->data['pi_flexform']; $this->cObj->data['pi_flexform'] = GeneralUtility::xml2array($this->cObj->data['pi_flexform']); + $this->javaScriptObj = GeneralUtility::makeInstance('tx_ttproducts_javascript'); $config['code'] = tx_div2007_alpha5::getSetupOrFFvalue_fh004( @@ -270,7 +271,6 @@ public function init (&$content, &$conf, &$config, $pibaseClass, &$errorCode, $b if ($config['displayCurrentRecord']) { $row = $this->cObj->data; $this->tt_product_single['product'] = $row['uid']; - } else { $error_detail = ''; $paramArray = array('product', 'article'); @@ -291,13 +291,11 @@ public function init (&$content, &$conf, &$config, $pibaseClass, &$errorCode, $b if ($error_detail != '') { $errorCode[0] = 'wrong_' . $error_detail; - $errorCode[1] = $paramVal; + $errorCode[1] = htmlspecialchars($paramVal); return false; } } - - // image $imageObj = GeneralUtility::makeInstance('tx_ttproducts_field_image'); $imageObj->init($pibaseObj->cObj); @@ -330,8 +328,6 @@ public function init (&$content, &$conf, &$config, $pibaseClass, &$errorCode, $b $graduatedPriceViewObj = GeneralUtility::makeInstance('tx_ttproducts_graduated_price_view'); $graduatedPriceViewObj->init($graduatedPriceObj); - $this->javaScriptObj = GeneralUtility::makeInstance('tx_ttproducts_javascript'); - // JavaScript $this->javaScriptObj->init( $pibaseObj, @@ -760,7 +756,7 @@ public function &run ($pibaseClass, &$errorCode, $content = '', $bRunAjax = fals $messageArr = explode('|', $message = $languageObj->getLabel($indice)); $contentTmp .= '' . $languageObj->getLabel('tt_products') . ': ' . $messageArr[0] . ''; } else { - $contentTmp .= '' . $indice . $messageArr[$i] . ''; + $contentTmp .= '' . $indice . htmlspecialchars($messageArr[$i]) . ''; } $i++; } diff --git a/ext_emconf.php b/ext_emconf.php index 0cf2506c6..594fb642b 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -18,7 +18,7 @@ 'version' => '2.9.20', 'constraints' => [ 'depends' => [ - 'div2007' => '1.11.5-0.0.0', + 'div2007' => '1.11.5-1.11.99', 'php' => '5.5.0-7.4.99', 'table' => '0.7.7-0.0.0', 'tsparser' => '0.2.5-0.0.0',