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

Commit

Permalink
FIX: SQLi in contact groups form (#11869)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyahiaoui-ext committed Sep 28, 2022
1 parent 9122ac1 commit 98f9377
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 98f9377

Please sign in to comment.