Skip to content

Commit 6fb797f

Browse files
authored
Merge pull request #453 from kartolo/hotfix/2023110110000013
[Security] prevent user to input multiline value
2 parents 3a9cef7 + 634a54c commit 6fb797f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Classes/Utility/TsUtility.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ public function updatePagesTSconfig(int $id, array $pageTs, string $tsConfPrefix
6262
}
6363
$set = [];
6464
foreach ($pageTs as $f => $v) {
65-
$v = trim($v);
65+
// only get the first line of input and ignore the rest
66+
$v = strtok(trim($v), "\r\n");
67+
// if token is not found (false)
68+
if ($v === false) {
69+
// then set empty string
70+
$v = '';
71+
}
6672
$f = $tsConfPrefix . $f;
6773
$tempF = isset($impParams[$f]) ? trim($impParams[$f]) : '';
6874
if (strcmp($tempF, $v)) {

ext_emconf.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'author_company' => 'd.k.d Internet Service GmbH',
1010
'state' => 'stable',
1111
'clearcacheonload' => 0,
12-
'version' => '9.5.1',
12+
'version' => '9.5.2',
1313
'constraints' => [
1414
'depends' => [
1515
'typo3' => '11.5.0-11.99.99',

0 commit comments

Comments
 (0)