Skip to content

Commit 811bf56

Browse files
authored
Fix(Core): escape data when check if already exist (#457)
1 parent 6a41882 commit 811bf56

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Fixed
1111

1212
- Use `global` configuration for injection links
13+
- Escape data when check if already exist
1314

1415
## [2.14.1] - 2024-12-27
1516

inc/commoninjectionlib.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1932,7 +1932,7 @@ private function dataAlreadyInDB($injectionClass, $itemtype)
19321932
$where .= " AND `id` IN (SELECT `users_id` FROM glpi_useremails WHERE `email` = '$email') ";
19331933
} else {
19341934
$where .= " AND `" . $field . "`='" .
1935-
$this->getValueByItemtypeAndName($itemtype, $field) . "'";
1935+
Sanitizer::dbEscape((string) $this->getValueByItemtypeAndName($itemtype, $field)) . "'";
19361936
}
19371937
}
19381938
}

0 commit comments

Comments
 (0)