Skip to content

Commit bb34f1b

Browse files
authored
Merge pull request #455 from kartolo/hotfix/2023110110000013_v7
[Security] prevent user to input multiline value
2 parents 898d2c6 + bb5e861 commit bb34f1b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Classes/DirectMailUtility.php

+7
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,13 @@ public static function updatePagesTSconfig($id, array $pageTs, $tsConfPrefix, $i
15821582
}
15831583
$set = array();
15841584
foreach ($pageTs as $f => $v) {
1585+
// only get the first line of input and ignore the rest
1586+
$v = strtok(trim($v), "\r\n");
1587+
// if token is not found (false)
1588+
if ($v === false) {
1589+
// then set empty string
1590+
$v = '';
1591+
}
15851592
$f = $tsConfPrefix . $f;
15861593
if ((!isset($impParams[$f]) && trim($v)) || strcmp(trim($impParams[$f]), trim($v))) {
15871594
$set[$f] = trim($v);

ext_emconf.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'title' => 'Direct Mail',
1515
'description' => 'Advanced Direct Mail/Newsletter mailer system with sophisticated options for personalization of emails including response statistics.',
1616
'category' => 'module',
17-
'version' => '7.0.1',
17+
'version' => '7.0.3',
1818
'state' => 'stable',
1919
'clearcacheonload' => 0,
2020
'lockType' => '',

0 commit comments

Comments
 (0)