Skip to content

Commit 559424e

Browse files
committed
fix(targetticket,targetchange): escape text fields of targets
Signed-off-by: Thierry Bugier <[email protected]>
1 parent d4ca172 commit 559424e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

inc/targetchange.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
171171
);
172172
}
173173

174+
// Escape text fields
175+
foreach (['target_name'] as $key) {
176+
$input[$key] = $DB->escape($input[$key]);
177+
}
174178

175179
// Assume that all questions are already imported
176180
// convert question uuid into id

inc/targetticket.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,10 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
897897
);
898898
}
899899

900+
// Escape text fields
901+
foreach (['target_name'] as $key) {
902+
$input[$key] = $DB->escape($input[$key]);
903+
}
900904

901905
// Assume that all questions are already imported
902906
// convert question uuid into id

0 commit comments

Comments
 (0)