Skip to content

Commit

Permalink
fix(targetticket,targetchange): escape single quotes
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 6, 2019
1 parent 75338b7 commit 5d5f22b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions inc/targetchange.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ public static function import($targetitems_id = 0, $target_data = []) {
}
}

// escape text fields
foreach (['title', 'content'] as $key) {
$target_data[$key] = $DB->escape($target_data[$key]);
}

// update target ticket
$item->update($target_data);

Expand Down
2 changes: 1 addition & 1 deletion inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ public static function import($targetitems_id = 0, $target_data = []) {
}

// escape text fields
foreach (['title'] as $key) {
foreach (['title', 'content'] as $key) {
$target_data[$key] = $DB->escape($target_data[$key]);
}

Expand Down

0 comments on commit 5d5f22b

Please sign in to comment.