Skip to content

Commit

Permalink
fix(target): 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 11, 2019
1 parent ec80a87 commit 9f641e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/targetbase.class.php
Expand Up @@ -1132,6 +1132,8 @@ protected function setTargetDueDate($data, PluginFormcreatorFormAnswer $formansw
}

public function prepareInputForUpdate($input) {
global $DB;

// generate a unique id
if (!isset($input['uuid'])
|| empty($input['uuid'])) {
Expand All @@ -1147,7 +1149,7 @@ public function prepareInputForUpdate($input) {
if (!$target->isNewItem()) {
$target->update([
'id' => $target->getID(),
'name' => $input['name'],
'name' => $DB->escape($input['name']),
]);
}
}
Expand Down

0 comments on commit 9f641e3

Please sign in to comment.