summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-01-17 09:53:00 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-01-17 09:53:00 -0200
commit2dde998935cd0bfb4c72ca0512366cf248088ba1 (patch)
tree2160f3538f34ab8d1b6e820b289e683e33a72a0c
parent0ff214f27d38d8f867b4665d9e61d080da03d6f4 (diff)
downloadpfsense-2dde998935cd0bfb4c72ca0512366cf248088ba1.zip
pfsense-2dde998935cd0bfb4c72ca0512366cf248088ba1.tar.gz
Fix build list of widgets
Only consider files ending in ".php" to restrict widgets and avoid load wrong files. It should fix #2761
-rwxr-xr-xusr/local/www/index.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index 1287672..c8d721c 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -97,6 +97,9 @@ $widgetlist = array();
while (false !== ($filename = readdir($dirhandle))) {
$periodpos = strpos($filename, ".");
+ /* Ignore files not ending in .php */
+ if (substr($filename, -4, 4) != ".php")
+ continue;
$widgetname = substr($filename, 0, $periodpos);
$widgetnames[] = $widgetname;
if ($widgetname != "system_information")
OpenPOWER on IntegriCloud