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

Commit

Permalink
FIX: Sanitize and bind Centreon Notification class 21.10.x (#11792)
Browse files Browse the repository at this point in the history
* FIX: Sanitize and bind Centreon Notification class (#11757)

* Update www/class/centreonNotification.class.php

Co-authored-by: TamazC <103252125+TamazC@users.noreply.github.com>
  • Loading branch information
hyahiaoui-ext and TamazC authored Sep 21, 2022
1 parent 11214d6 commit 3815a9f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions www/class/centreonNotification.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,12 @@ protected function getHostTemplateNotifications($hostId, $templates)
FROM host_template_relation htr
LEFT JOIN contact_host_relation ctr ON htr.host_host_id = ctr.host_host_id
LEFT JOIN contactgroup_host_relation ctr2 ON htr.host_host_id = ctr2.host_host_id
WHERE htr.host_host_id = " . $hostId . "
WHERE htr.host_host_id = :host_id
ORDER BY `order`";
$res = $this->db->query($sql);
while ($row = $res->fetchRow()) {
$statement = $this->db->prepare($sql);
$statement->bindValue(':host_id', (int) $hostId, \PDO::PARAM_INT);
$statement->execute();
while ($row = $statement->fetch(\PDO::FETCH_ASSOC)) {
if ($row['contact_id']) {
$this->hostBreak[1] = true;
}
Expand Down

0 comments on commit 3815a9f

Please sign in to comment.