Skip to content

Commit df0855d

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

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/suite-unit/PluginFormcreatorTargetChange.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function testGetTargetItemtypeName() {
228228
*/
229229
public function testSetTargetEntity() {
230230
global $CFG_GLPI;
231-
231+
232232
// Disable notification to avoid output to console
233233
$CFG_GLPI['use_notifications'] = '0';
234234

@@ -339,7 +339,7 @@ public function testSetTargetEntity() {
339339
'destination_entity_value' => '0',
340340
]);
341341
$instance->getFromDB($targetChange->getID());
342-
342+
343343
// Disable notification to avoid output to console
344344
$CFG_GLPI['use_notifications'] = '0';
345345

@@ -465,6 +465,7 @@ public function testImport() {
465465
$uuid = plugin_formcreator_getUuid();
466466
$input = [
467467
'name' => $this->getUniqueString(),
468+
'target_name' => $this->getUniqueString(),
468469
'content' => $this->getUniqueString(),
469470
'impactcontent' => $this->getUniqueString(),
470471
'controlistcontent' => $this->getUniqueString(),

tests/suite-unit/PluginFormcreatorTargetTicket.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ public function testImport() {
574574
$uuid = plugin_formcreator_getUuid();
575575
$input = [
576576
'name' => $this->getUniqueString(),
577+
'target_name' => $this->getUniqueString(),
577578
'content' => $this->getUniqueString(),
578579
'due_date_rule' => \PluginFormcreatorTargetTicket::DUE_DATE_RULE_NONE,
579580
'due_date_question' => '0',

0 commit comments

Comments
 (0)