Exploit databaseDownload repository ZIP
GH-066dffbe2334b8891942069745b5a44c
365807072/gdr
Sources for CVE-2019-6713
12 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files20
365807072/gdrRevision 45d5bdb279df
- ↑..Parent directory
- DialogController.php
- HookController.php
- IndexController.php
- LinkController.php
- MailerController.php
- MainController.php
- MenuController.php
- NavController.php
- NavMenuController.php
- PluginController.php
- PublicController.php
- RbacController.php
- RecycleBinController.php
- RouteController.php
- SettingController.php
- SlideController.php
- SlideItemController.php
- StorageController.php
- ThemeController.php
- UserController.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
app/admin/controller/MainController.php
PHP · 4,109 bytes<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < [email protected]>
// +----------------------------------------------------------------------
namespace app\admin\controller;
use cmf\controller\AdminBaseController;
use think\Db;
use app\admin\model\Menu;
class MainController extends AdminBaseController
{
/**
* 后台欢迎页
*/
public function index()
{
$dashboardWidgets = [];
$widgets = cmf_get_option('admin_dashboard_widgets');
$defaultDashboardWidgets = [
'_SystemCmfHub' => ['name' => 'CmfHub', 'is_system' => 1],
'_SystemCmfDocuments' => ['name' => 'CmfDocuments', 'is_system' => 1],
'_SystemMainContributors' => ['name' => 'MainContributors', 'is_system' => 1],
'_SystemContributors' => ['name' => 'Contributors', 'is_system' => 1],
'_SystemCustom1' => ['name' => 'Custom1', 'is_system' => 1],
'_SystemCustom2' => ['name' => 'Custom2', 'is_system' => 1],
'_SystemCustom3' => ['name' => 'Custom3', 'is_system' => 1],
'_SystemCustom4' => ['name' => 'Custom4', 'is_system' => 1],
'_SystemCustom5' => ['name' => 'Custom5', 'is_system' => 1],
];
if (empty($widgets)) {
$dashboardWidgets = $defaultDashboardWidgets;
} else {
foreach ($widgets as $widget) {
if ($widget['is_system']) {
$dashboardWidgets['_System' . $widget['name']] = ['name' => $widget['name'], 'is_system' => 1];
} else {
$dashboardWidgets[$widget['name']] = ['name' => $widget['name'], 'is_system' => 0];
}
}
foreach ($defaultDashboardWidgets as $widgetName => $widget) {
$dashboardWidgets[$widgetName] = $widget;
}
}
$dashboardWidgetPlugins = [];
$hookResults = hook('admin_dashboard');
if (!empty($hookResults)) {
foreach ($hookResults as $hookResult) {
if (isset($hookResult['width']) && isset($hookResult['view']) && isset($hookResult['plugin'])) { //验证插件返回合法性
$dashboardWidgetPlugins[$hookResult['plugin']] = $hookResult;
if (!isset($dashboardWidgets[$hookResult['plugin']])) {
$dashboardWidgets[$hookResult['plugin']] = ['name' => $hookResult['plugin'], 'is_system' => 0];
}
}
}
}
$smtpSetting = cmf_get_option('smtp_setting');
$this->assign('dashboard_widgets', $dashboardWidgets);
$this->assign('dashboard_widget_plugins', $dashboardWidgetPlugins);
$this->assign('has_smtp_setting', empty($smtpSetting) ? false : true);
return $this->fetch();
}
public function dashboardWidget()
{
$dashboardWidgets = [];
$widgets = $this->request->param('widgets/a');
if (!empty($widgets)) {
foreach ($widgets as $widget) {
if ($widget['is_system']) {
array_push($dashboardWidgets, ['name' => $widget['name'], 'is_system' => 1]);
} else {
array_push($dashboardWidgets, ['name' => $widget['name'], 'is_system' => 0]);
}
}
}
cmf_set_option('admin_dashboard_widgets', $dashboardWidgets, true);
$this->success('更新成功!');
}
}