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

Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
065031c
fix(git): sync dev-21.04.x with 21.04.x (#11526)
kduret Aug 6, 2022
b2f03b0
[SNYK] Sanitize and bind ACL host dependency queries (#11389) (#11521)
emabassi-ext Aug 8, 2022
e8e1194
[SNYK] Sanitize and bind centreonGraph class queries (#11409) (#11517)
emabassi-ext Aug 8, 2022
b667811
removed old variable userCrypted and the use of it (#11334) (#11516)
emabassi-ext Aug 8, 2022
cabad1b
fix(test): wait 8s before checking downtime is active in rest api v1 …
kduret Aug 8, 2022
0d02289
[Snyk] Sanitize and bind ACL action access queries (#11385) (#11514)
emabassi-ext Aug 8, 2022
6935384
[SNYK] Sanitize and bind ACL class queries (#11392) (#11513)
emabassi-ext Aug 8, 2022
6bc2b2e
fix(pendo): correctly set locale when language is detection by browse…
jeremyjaouen Aug 8, 2022
3907bab
doc(ack): acknowledge Hakaï security (#11538)
sc979 Aug 8, 2022
5967804
SNYK: Sanitize and bind ACL actions queries (#11549)
hyahiaoui-ext Aug 9, 2022
b8eb592
SNYK: Sanitize and bind Broker listing queries (#11553)
hyahiaoui-ext Aug 9, 2022
5998080
fix(conf) fix encoding in template service listing (#11558) (#11566)
a-launois Aug 11, 2022
3282dd1
SNYK: Sanitize and bind generateImage queries (#11563)
hyahiaoui-ext Aug 11, 2022
53a6c28
MON-14501 - sanitize query in centreonXmlbgRequest class (#11572)
emabassi-ext Aug 11, 2022
46fde16
SNYK: Sanitize and bind Meta-Services dependency queries (#11554) (#1…
emabassi-ext Aug 11, 2022
b7adc2b
Fix encoding issue on status serviceXML
TamazC Aug 12, 2022
4df9fc8
Merge branch 'dev-21.04.x' into bugfix_MON-14190-deprecated_status_de…
TamazC Aug 30, 2022
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