Skip to content

Commit

Permalink
Prevent sql injection through the ids of the action
Browse files Browse the repository at this point in the history
  • Loading branch information
carakas committed Mar 23, 2022
1 parent 1b38e33 commit 7a12046
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Backend/Modules/FormBuilder/Engine/Model.php
Expand Up @@ -152,6 +152,7 @@ public static function delete(int $id): void
public static function deleteData(array $ids): void
{
$database = BackendModel::getContainer()->get('database');
$ids = array_map('intval', $ids);

$database->delete('forms_data', 'id IN(' . implode(',', $ids) . ')');
$database->delete('forms_data_fields', 'data_id IN(' . implode(',', $ids) . ')');
Expand Down

0 comments on commit 7a12046

Please sign in to comment.