Skip to content

Commit 06d9089

Browse files
committed
fix(abstracttarget): missing escaping before SQL query
1 parent 8a8f8d4 commit 06d9089

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

inc/abstracttarget.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,10 +565,12 @@ public function prepareInputForClone($input) {
565565
}
566566

567567
protected static function getTemplateByName(string $name): int {
568+
global $DB;
569+
568570
$targetTemplateType = (new static())->getTemplateItemtypeName();
569571
$targetTemplate = new $targetTemplateType();
570572
$targetTemplate->getFromDBByCrit([
571-
'name' => $name,
573+
'name' => $DB->escape($name),
572574
]);
573575

574576
if ($targetTemplate->isNewItem()) {

0 commit comments

Comments
 (0)