diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-01-17 09:53:00 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-01-17 09:53:00 -0200 |
commit | 2dde998935cd0bfb4c72ca0512366cf248088ba1 (patch) | |
tree | 2160f3538f34ab8d1b6e820b289e683e33a72a0c | |
parent | 0ff214f27d38d8f867b4665d9e61d080da03d6f4 (diff) | |
download | pfsense-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-x | usr/local/www/index.php | 3 |
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") |