Skip to content

Commit

Permalink
Fix(SQL): sanitize data (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored Dec 27, 2024
1 parent 31d1340 commit 6aca1b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Jamf Plugin for GLPI Changelog

## [UNRELEASED]

### Fixes

- SQL error when merging the Jamf device linked to a GLPI asset

## [3.1.1]

### Fixes
Expand Down
3 changes: 2 additions & 1 deletion front/merge.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/

use Glpi\Application\View\TemplateRenderer;
use Glpi\Toolbox\Sanitizer;

include('../../../inc/includes.php');

Expand Down Expand Up @@ -73,7 +74,7 @@
'WHERE' => [
'OR' => [
'uuid' => $data['udid'],
'name' => $data['name']
'name' => Sanitizer::sanitize($data['name'])
],
'is_deleted' => 0,
'is_template' => 0
Expand Down

0 comments on commit 6aca1b1

Please sign in to comment.