summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/pkg.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-05-06 09:29:58 -0400
committerjim-p <jimp@pfsense.org>2016-05-06 09:32:05 -0400
commitd6ab749630ab5fa4a1d3fe6e58ce47452217cdbc (patch)
tree3e832731b5bf4dc661d829d6d73154568cfc8654 /src/usr/local/www/pkg.php
parentabb48814381a50e7197ff197fc4c1ad833d88992 (diff)
downloadpfsense-d6ab749630ab5fa4a1d3fe6e58ce47452217cdbc.zip
pfsense-d6ab749630ab5fa4a1d3fe6e58ce47452217cdbc.tar.gz
Change the default output of pkg.php lists to be encoded before display. Preserve the old behavior as an option in case a package needs it (I didn't see any current ones that appeared to rely on the behavior, however)
Diffstat (limited to 'src/usr/local/www/pkg.php')
-rwxr-xr-xsrc/usr/local/www/pkg.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php
index 2a34885..c06d613 100755
--- a/src/usr/local/www/pkg.php
+++ b/src/usr/local/www/pkg.php
@@ -515,18 +515,23 @@ if ($savemsg) {
} else if ($column['type'] == "interface") {
echo $column['prefix'] . $iflist[$fieldname] . $column['suffix'];
} else {
+ $display_text = "";
#Check if columnitem has an encoding field declared
if ($column['encoding'] == "base64") {
- echo $column['prefix'] . base64_decode($fieldname) . $column['suffix'];
+ $display_text = $column['prefix'] . base64_decode($fieldname) . $column['suffix'];
#Check if there is a custom info to show when $fieldname is not empty
} else if ($column['listmodeon'] && $fieldname != "") {
- echo $column['prefix'] . gettext($column['listmodeon']). $column['suffix'];
+ $display_text = $column['prefix'] . gettext($column['listmodeon']). $column['suffix'];
#Check if there is a custom info to show when $fieldname is empty
} else if ($column['listmodeoff'] && $fieldname == "") {
- echo $column['prefix'] .gettext($column['listmodeoff']). $column['suffix'];
+ $display_text = $column['prefix'] .gettext($column['listmodeoff']). $column['suffix'];
} else {
- echo $column['prefix'] . $fieldname ." ". $column['suffix'];
+ $display_text = $column['prefix'] . $fieldname ." ". $column['suffix'];
}
+ if (!isset($column['allow_html'])) {
+ $display_text = htmlspecialchars($display_text);
+ }
+ echo $display_text;
}
?>
</td>
OpenPOWER on IntegriCloud