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

Commit

Permalink
Fix encoding issue on status serviceXML (#11581)
Browse files Browse the repository at this point in the history
  • Loading branch information
TamazC authored Aug 30, 2022
1 parent d9b07e3 commit 003259b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions www/include/monitoring/status/Services/xml/serviceXML.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
Expand Down Expand Up @@ -35,17 +36,17 @@

// Require configuration.
require_once realpath(__DIR__ . "/../../../../../../bootstrap.php");
include_once _CENTREON_PATH_ . "www/class/centreonUtils.class.php";
require_once _CENTREON_PATH_ . "www/class/centreonUtils.class.php";

// Require Specific XML / Ajax Class
include_once _CENTREON_PATH_ . "www/class/centreonXMLBGRequest.class.php";
include_once _CENTREON_PATH_ . "www/class/centreonInstance.class.php";
include_once _CENTREON_PATH_ . "www/class/centreonCriticality.class.php";
include_once _CENTREON_PATH_ . "www/class/centreonMedia.class.php";
require_once _CENTREON_PATH_ . "www/class/centreonXMLBGRequest.class.php";
require_once _CENTREON_PATH_ . "www/class/centreonInstance.class.php";
require_once _CENTREON_PATH_ . "www/class/centreonCriticality.class.php";
require_once _CENTREON_PATH_ . "www/class/centreonMedia.class.php";

// Require common Files.
include_once _CENTREON_PATH_ . "www/include/monitoring/status/Common/common-Func.php";
include_once _CENTREON_PATH_ . "www/include/common/common-Func.php";
require_once _CENTREON_PATH_ . "www/include/monitoring/status/Common/common-Func.php";
require_once _CENTREON_PATH_ . "www/include/common/common-Func.php";

// Create XML Request Objects
CentreonSession::start();
Expand Down Expand Up @@ -142,7 +143,7 @@
}

$tabOrder = [];
$tabOrder["criticality_id"] = " ORDER BY isnull " .$order . ", criticality " . $order . ", h.name, s.description ";
$tabOrder["criticality_id"] = " ORDER BY isnull " . $order . ", criticality " . $order . ", h.name, s.description ";
$tabOrder["host_name"] = " ORDER BY h.name " . $order . ", s.description ";
$tabOrder["service_description"] = " ORDER BY s.description " . $order . ", h.name";
$tabOrder["current_state"] = " ORDER BY s.state " . $order . ", h.name, s.description";
Expand Down Expand Up @@ -480,7 +481,7 @@
$obj->XML->writeElement("sc", $obj->colorService[$data["state"]]);
$obj->XML->writeElement("cs", _($obj->statusService[$data["state"]]), false);
$obj->XML->writeElement("ssc", $data["state"]);
$obj->XML->writeElement("po", CentreonUtils::escapeSecure($pluginShortOuput));
$obj->XML->writeElement("po", htmlspecialchars(htmlspecialchars($pluginShortOuput)));
$obj->XML->writeElement(
"ca",
$data["current_attempt"] . "/" . $data["max_check_attempts"]
Expand Down

0 comments on commit 003259b

Please sign in to comment.