Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

FIX: SQLi in contact groups form 21.10.x #11875

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@
/*
* Get host Group information
*/
$DBRESULT = $pearDB->query("SELECT * FROM `contactgroup` WHERE `cg_id` = '" . $cg_id . "' LIMIT 1");
$statement = $pearDB->prepare("SELECT * FROM `contactgroup` WHERE `cg_id` = :cg_id LIMIT 1");
$statement->bindValue(':cg_id', (int) $cg_id, \PDO::PARAM_INT);
$statement->execute();

/*
* Set base value
*/
$cg = array_map("myDecode", $DBRESULT->fetchRow());
$cg = array_map("myDecode", $statement->fetch(\PDO::FETCH_ASSOC));
}

$attrsText = array("size" => "30");
Expand Down