Skip to content

Commit 56f9ecd

Browse files
authored
Fix(Report): fix injection from GLPI Stat (#349)
* Fix(Report): fix injection from GLPI Stat * adapt CHANGELOG.md
1 parent 298eb52 commit 56f9ecd

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [UNRELEASED]
9+
10+
### Fixed
11+
12+
- Fix GLIP Stat injection
13+
814
## [1.9.3] - 2026-01-08
915

1016
### Fixed

inc/common.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function getAllReports($with_url = true, $params = [])
223223

224224
if ($with_url) {
225225
$reports[$classname]['functions'][$i]['url_graph'] = $url_graph;
226-
$reports[$classname]['functions'][$i]['min_url_graph'] = $min_url_graph;
226+
$reports[$classname]['functions'][$i]['min_url_graph'] = html_entity_decode($min_url_graph, ENT_QUOTES | ENT_HTML5, 'UTF-8');
227227
}
228228

229229
$i++;

setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function plugin_init_mreporting()
127127
}
128128

129129
/* Show Reports in standart stats page */
130-
if (preg_match('#front/stat.*\.php#', $_SERVER['SCRIPT_NAME'])) {
130+
if (preg_match('#front/stat.*\.php#', $_SERVER['REQUEST_URI'])) {
131131
$mreporting_common = new PluginMreportingCommon();
132132
$reports = $mreporting_common->getAllReports();
133133
if ($reports !== false) {

0 commit comments

Comments
 (0)