Skip to content
Permalink
Browse files Browse the repository at this point in the history
Escape GLPI-Network registration information
  • Loading branch information
cedric-anne authored and trasher committed Sep 14, 2022
1 parent ae98006 commit 2b8f9aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/GLPINetwork.php
Expand Up @@ -33,6 +33,7 @@
* ---------------------------------------------------------------------
*/

use Glpi\Toolbox\Sanitizer;
use Glpi\Toolbox\VersionParser;

class GLPINetwork extends CommonGLPI
Expand Down Expand Up @@ -105,20 +106,20 @@ public static function showForConfig()
echo "<td>";
echo "<div class=' " . (($informations['is_valid'] && $informations['subscription']['is_running'] ?? false) ? 'ok' : 'red') . "'> ";
echo "<i class='fa fa-info-circle'></i>";
echo $informations['validation_message'];
echo Sanitizer::encodeHtmlSpecialChars($informations['validation_message']);
echo "</div>";
echo "</td>";
echo "</tr>";
}

echo "<tr class='tab_bg_2'>";
echo "<td>" . __('Subscription') . "</td>";
echo "<td>" . ($informations['subscription'] !== null ? $informations['subscription']['title'] : __('Unknown')) . "</td>";
echo "<td>" . ($informations['subscription'] !== null ? Sanitizer::encodeHtmlSpecialChars($informations['subscription']['title']) : __('Unknown')) . "</td>";
echo "</tr>";

echo "<tr class='tab_bg_2'>";
echo "<td>" . __('Registered by') . "</td>";
echo "<td>" . ($informations['owner'] !== null ? $informations['owner']['name'] : __('Unknown')) . "</td>";
echo "<td>" . ($informations['owner'] !== null ? Sanitizer::encodeHtmlSpecialChars($informations['owner']['name']) : __('Unknown')) . "</td>";
echo "</tr>";
}

Expand Down

0 comments on commit 2b8f9aa

Please sign in to comment.