admin 发表于 2018-3-9 06:05:25

Discuz任意文件删除漏洞

Discuz任意文件删除漏洞
简介:
没有对unlink的条件进行判断,造成任意文件删除漏洞。

修复方法:
找到/source/include/spacecp/spacecp_profile.php
第226行:
      continue;
                              }
                              @unlink(getglobal('setting/attachdir').'./profile/'.$space[$key]);
                              $setarr[$key] = $attach['attachment'];
                        }
替换为
      continue;}if(isset($_G['cache']['profilesetting'][$key]) && $_G['cache']['profilesetting'][$key]['formtype'] == 'file') {@unlink(getglobal('setting/attachdir').'./profile/'.$space[$key]);$setarr[$key] = $attach['attachment'];}
                        }


页: [1]
查看完整版本: Discuz任意文件删除漏洞