Skip to content

Commit

Permalink
Merge pull request #453 from kartolo/hotfix/2023110110000013
Browse files Browse the repository at this point in the history
[Security] prevent user to input multiline value
  • Loading branch information
kartolo authored Dec 12, 2023
2 parents 3a9cef7 + 634a54c commit 6fb797f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Classes/Utility/TsUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ public function updatePagesTSconfig(int $id, array $pageTs, string $tsConfPrefix
}
$set = [];
foreach ($pageTs as $f => $v) {
$v = trim($v);
// only get the first line of input and ignore the rest
$v = strtok(trim($v), "\r\n");
// if token is not found (false)
if ($v === false) {
// then set empty string
$v = '';
}
$f = $tsConfPrefix . $f;
$tempF = isset($impParams[$f]) ? trim($impParams[$f]) : '';
if (strcmp($tempF, $v)) {
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'author_company' => 'd.k.d Internet Service GmbH',
'state' => 'stable',
'clearcacheonload' => 0,
'version' => '9.5.1',
'version' => '9.5.2',
'constraints' => [
'depends' => [
'typo3' => '11.5.0-11.99.99',
Expand Down

0 comments on commit 6fb797f

Please sign in to comment.