diff --git a/LibreNMS/Alert/Transport.php b/LibreNMS/Alert/Transport.php
index 8bb440707cf5..322c0d189d4b 100644
--- a/LibreNMS/Alert/Transport.php
+++ b/LibreNMS/Alert/Transport.php
@@ -115,7 +115,7 @@ public function displayDetails(): string
$val = $this->config[$item['name']];
if ($item['type'] == 'password') {
- $val = '••••••••';
+ $val = '********';
} elseif ($item['type'] == 'select') {
// Match value to key name for select inputs
$val = array_search($val, $item['options']);
diff --git a/includes/html/print-alert-transports.php b/includes/html/print-alert-transports.php
index c691707d8579..fae47c4b5e27 100644
--- a/includes/html/print-alert-transports.php
+++ b/includes/html/print-alert-transports.php
@@ -34,10 +34,10 @@
foreach (\App\Models\AlertTransport::orderBy('transport_name', 'asc')->get() as $transport) {
$instance = $transport->instance();
echo "
transport_id}\">";
- echo '' . $transport->transport_name . ' | ';
- echo '' . $instance->name() . ' | ';
+ echo '' . htmlentities($transport->transport_name) . ' | ';
+ echo '' . htmlentities($instance->name()) . ' | ';
echo $transport->is_default ? 'Yes | ' : 'No | ';
- echo '' . nl2br($instance->displayDetails()) . ' | ';
+ echo '' . nl2br(htmlentities($instance->displayDetails())) . ' | ';
echo '';
// Add action buttons for admin users only
@@ -76,14 +76,14 @@
$query = 'SELECT `transport_group_id` AS `id`, `transport_group_name` AS `name` FROM `alert_transport_groups` order by `name`';
foreach (dbFetchRows($query) as $group) {
echo " |
";
- echo '' . $group['name'] . ' | ';
+ echo '' . htmlentities($group['name']) . ' | ';
//List out the members of each group
$query = 'SELECT `transport_type`, `transport_name` FROM `transport_group_transport` AS `a` LEFT JOIN `alert_transports` AS `b` ON `a`.`transport_id`=`b`.`transport_id` WHERE `transport_group_id`=? order by `transport_name`';
$members = dbFetchRows($query, [$group['id']]);
echo '';
foreach ($members as $member) {
- echo '' . ucfirst($member['transport_type']) . ': ' . $member['transport_name'] . ' ';
+ echo '' . htmlentities(ucfirst($member['transport_type'])) . ': ' . htmlentities($member['transport_name']) . ' ';
}
echo ' | ';
echo '';
|