summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_dns.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-08-22 12:29:39 -0400
committerjim-p <jimp@pfsense.org>2016-08-22 12:30:28 -0400
commita92de66e669ae701dfe655080904c84536a02210 (patch)
tree0ae9d22fc7fdbe61c1e608c114f5a9587ab62c61 /src/usr/local/www/diag_dns.php
parentca3dc6c9ac6b6045430779f407a31ed620f5a32d (diff)
downloadpfsense-a92de66e669ae701dfe655080904c84536a02210.zip
pfsense-a92de66e669ae701dfe655080904c84536a02210.tar.gz
Add output encoding to diag_dns.php for results returned from DNS. Fixes #6737
Diffstat (limited to 'src/usr/local/www/diag_dns.php')
-rw-r--r--src/usr/local/www/diag_dns.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php
index 26c45c9..787f27a 100644
--- a/src/usr/local/www/diag_dns.php
+++ b/src/usr/local/www/diag_dns.php
@@ -192,8 +192,8 @@ if (($_POST['host']) && ($_POST['dialog_output'])) {
function display_host_results ($address, $hostname, $dns_speeds) {
$map_lengths = function($element) { return strlen($element[0]); };
- echo gettext("IP Address") . ": {$address} \n";
- echo gettext("Host Name") . ": {$hostname} \n";
+ echo gettext("IP Address") . ": " . htmlspecialchars($address) . " \n";
+ echo gettext("Host Name") . ": " . htmlspecialchars($hostname) . " \n";
echo "\n";
$text_table = array();
$text_table[] = array(gettext("Server"), gettext("Query Time"));
@@ -278,7 +278,7 @@ if (!$input_errors && $type) {
<tbody>
<?php foreach ((array)$resolved as $hostitem):?>
<tr>
- <td><?=$hostitem['data']?></td><td><?=$hostitem['type']?></td>
+ <td><?=htmlspecialchars($hostitem['data'])?></td><td><?=htmlspecialchars($hostitem['type'])?></td>
</tr>
<?php endforeach; ?>
</tbody>
@@ -302,7 +302,7 @@ if (!$input_errors && $type) {
<tbody>
<?php foreach ((array)$dns_speeds as $qt):?>
<tr>
- <td><?=$qt['dns_server']?></td><td><?=$qt['query_time']?></td>
+ <td><?=htmlspecialchars($qt['dns_server'])?></td><td><?=htmlspecialchars($qt['query_time'])?></td>
</tr>
<?php endforeach; ?>
</tbody>
OpenPOWER on IntegriCloud