Skip to content

Commit

Permalink
fix(form): escape single quote when duplicating a form
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 9f641e3 commit 9d735d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inc/form.class.php
Expand Up @@ -1304,6 +1304,12 @@ public function duplicate() {
unset($row['id'],
$row['uuid']);
$row['plugin_formcreator_forms_id'] = $new_form_id;

// escape text fields
foreach (['name'] as $key) {
$row[$key] = $DB->escape($row[$key]);
}

if (!$form_profile->add($row)) {
return false;
}
Expand Down

0 comments on commit 9d735d8

Please sign in to comment.