From 54be934003b00cd37e123b875ff447603bea6c2f Mon Sep 17 00:00:00 2001 From: xushubieli Date: Wed, 25 May 2022 11:48:55 +0800 Subject: [PATCH] admin --- src/admin/file_manage_control.php | 4 ++-- src/admin/media_add.php | 7 ++----- src/admin/templets/file_manage_main.htm | 28 ++++++++++++------------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/admin/file_manage_control.php b/src/admin/file_manage_control.php index d5b80db7..691b8d64 100644 --- a/src/admin/file_manage_control.php +++ b/src/admin/file_manage_control.php @@ -133,7 +133,7 @@ else if ($fmdo == "space") { } else { $ecpath = $activepath; } - $titleinfo = "目录 $ecpath 空间使用状况:
"; + $titleinfo = "目录[$ecpath]空间使用状况:
"; $wintitle = "文件管理"; $wecome_info = "文件管理::空间大小检查 [文件浏览器]"; $activepath = $cfg_basedir.$activepath; @@ -145,7 +145,7 @@ else if ($fmdo == "space") { $win = new OxWindow(); $win->Init("", "js/blank.js", "POST"); $win->AddTitle($titleinfo); - $win->AddMsgItem("  $totalmb M
  $totalkb KB
  $total 字节"); + $win->AddMsgItem("$totalmb M
$totalkb KB
$total 字节"); $winform = $win->GetWindow(""); $win->Display(); } \ No newline at end of file diff --git a/src/admin/media_add.php b/src/admin/media_add.php index d94b85c9..2b13b1e2 100644 --- a/src/admin/media_add.php +++ b/src/admin/media_add.php @@ -34,7 +34,7 @@ if ($dopost == "upload") { $mediatype = 2; $savePath = $cfg_other_medias."/".$dpath; } - //2011-6-2 修复附件无法上传的错误(by:tianya) + //修复附件无法上传的错误 else if (preg_match('#audio|media|video#i', $upfile_type) && preg_match("#\.".$cfg_mediatype."$#i", $upfile_name)) { $mediatype = 3; $savePath = $cfg_other_medias."/".$dpath; @@ -52,10 +52,7 @@ if ($dopost == "upload") { MkdirAll($cfg_basedir.$savePath, 777); CloseFtp(); } - /* - 后台文件任意上传漏洞 - 漏洞描述:早期版本后台存在大量的富文本编辑器,该控件提供了一些文件上传接口,同时对上传文件的后缀类型未进行严格的限制,这导致了黑客可以上传WEBSHELL,获取网站后台权限 - */ + //后台文件任意上传漏洞:早期版本后台存在大量的富文本编辑器,该控件提供了一些文件上传接口,同时对上传文件的后缀类型未进行严格的限制,这导致了黑客可以上传WEBSHELL,获取网站后台权限 if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)$#i', trim($filename))) { ShowMsg("您指定的文件名被系统禁止", "javascript:;"); exit(); diff --git a/src/admin/templets/file_manage_main.htm b/src/admin/templets/file_manage_main.htm index aeae8636..166855f4 100644 --- a/src/admin/templets/file_manage_main.htm +++ b/src/admin/templets/file_manage_main.htm @@ -93,7 +93,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(jpg)#i",$file)) { @@ -108,7 +108,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(swf|fla|fly)#i",$file)) { @@ -123,7 +123,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(zip|rar|tar.gz)#i",$file)) { @@ -138,7 +138,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(exe)#i",$file)) { @@ -153,7 +153,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(mp3|wma)#i",$file)) { @@ -168,7 +168,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(wmv|api)#i",$file)) { @@ -183,7 +183,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(rm|rmvb)#i",$file)) { @@ -198,7 +198,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(txt|inc|pl|cgi|asp|xml|xsl|aspx|cfm)#",$file)) { @@ -215,7 +215,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(htm|html)#i",$file)) { @@ -232,7 +232,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(php)#i",$file)) { @@ -249,7 +249,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(js)#i",$file)) { @@ -266,7 +266,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else if(preg_match("#\.(css)#i",$file)) { @@ -283,7 +283,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } else { $line = "\n $file @@ -295,7 +295,7 @@ 移动 "; - $files[] = $line; + $files[] = $line; } } foreach ($dirs as $dir)