Skip to content

Commit 90e229b

Browse files
author
Marius Burkard
committed
Merge branch 'develop' into 'develop'
Backport !744 Dashboard enhancements / quota view enhancements using bootstrap progress bars See merge request ispconfig/ispconfig3!1261
2 parents 7f3e0a7 + 15bdfc5 commit 90e229b

23 files changed

+482
-378
lines changed

interface/web/dashboard/dashboard.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,14 @@
160160
$handle = @opendir(ISPC_WEB_PATH.'/dashboard/dashlets');
161161
while ($file = @readdir($handle)) {
162162
if ($file != '.' && $file != '..' && !is_dir(ISPC_WEB_PATH.'/dashboard/dashlets/'.$file)) {
163-
$dashlet_name = substr($file, 0, -4);
164-
$dashlet_class = 'dashlet_'.$dashlet_name;
165-
include_once ISPC_WEB_PATH.'/dashboard/dashlets/'.$file;
166-
$dashlet_list[$dashlet_name] = new $dashlet_class;
163+
$splitfilename = explode('.', $file);
164+
$file_extension = pathinfo($file)['extension'];
165+
if ($file_extension === 'php') { // only allow .php files
166+
$dashlet_name = substr($file, 0, -4);
167+
$dashlet_class = 'dashlet_'.$dashlet_name;
168+
include_once ISPC_WEB_PATH.'/dashboard/dashlets/'.$file;
169+
$dashlet_list[$dashlet_name] = new $dashlet_class;
170+
}
167171
}
168172
}
169173

0 commit comments

Comments
 (0)