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

(fix) service status : encoding issue on status page #11582

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
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