Kaynağa Gözat

CNVD-C-2024-866100问题修复

tags/6.3.2
tianya 2 ay önce
ebeveyn
işleme
6b68f076e8
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. +5
    -1
      src/admin/file_manage_control.php

+ 5
- 1
src/admin/file_manage_control.php Dosyayı Görüntüle

@@ -17,6 +17,10 @@ $activepath = preg_replace("#^\/{1,}#", "/", $activepath);
if ($activepath == "/") $activepath = '';
if ($activepath == "") $inpath = $cfg_basedir;
else $inpath = $cfg_basedir.$activepath;
if (DEDEBIZ_SAFE_MODE && !preg_match("#^/static#",$activepath)) {
ShowMsg("安全模式下仅允许查看修改static目录文档", -1);
exit;
}
$files = json_decode(file_get_contents(DEDEDATA.'/admin/files.txt'));
$currentFolder = basename(__DIR__);
$realFiles = array();
@@ -86,7 +90,7 @@ else if ($fmdo == "del") {
else if ($fmdo == "edit") {
CheckCSRF();
$filename = str_replace("..", "", $filename);
if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml|htm)$#i', trim($filename))) {
if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml|htm)$#i', trim($filename)) || preg_match('#\.[\x00-\x1F\x7F]*$#', trim($filename))) {
ShowMsg("文件扩展名已被系统禁止", "javascript:;");
exit();
}


Yükleniyor…
İptal
Kaydet