Skip to content

Commit

Permalink
fix(targetticket,targetchange): escape text fields of targets
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Feb 5, 2020
1 parent 579e427 commit df0855d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/suite-unit/PluginFormcreatorTargetChange.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function testGetTargetItemtypeName() {
*/
public function testSetTargetEntity() {
global $CFG_GLPI;

// Disable notification to avoid output to console
$CFG_GLPI['use_notifications'] = '0';

Expand Down Expand Up @@ -339,7 +339,7 @@ public function testSetTargetEntity() {
'destination_entity_value' => '0',
]);
$instance->getFromDB($targetChange->getID());

// Disable notification to avoid output to console
$CFG_GLPI['use_notifications'] = '0';

Expand Down Expand Up @@ -465,6 +465,7 @@ public function testImport() {
$uuid = plugin_formcreator_getUuid();
$input = [
'name' => $this->getUniqueString(),
'target_name' => $this->getUniqueString(),
'content' => $this->getUniqueString(),
'impactcontent' => $this->getUniqueString(),
'controlistcontent' => $this->getUniqueString(),
Expand Down
1 change: 1 addition & 0 deletions tests/suite-unit/PluginFormcreatorTargetTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ public function testImport() {
$uuid = plugin_formcreator_getUuid();
$input = [
'name' => $this->getUniqueString(),
'target_name' => $this->getUniqueString(),
'content' => $this->getUniqueString(),
'due_date_rule' => \PluginFormcreatorTargetTicket::DUE_DATE_RULE_NONE,
'due_date_question' => '0',
Expand Down

0 comments on commit df0855d

Please sign in to comment.