POST TIME:2021-05-24 02:50
在本機 E:\wwwroot\DedeCMS\v57\ 下安裝了V57最新版本的主程序,安裝成功后,生成首頁提示 :
=====================
Error:check Snooping out of bounds @ D:\wwwroot\gdhgc\wwwroot\kj\templets\default\article_article.htm
=====================
使用notepad++搜索了下包含 Error:check Snooping out 的文件,找到 include/dedetag.class.php 文件的第
325行,內容如下
出現該問題,主要是路徑中包含了大寫字母,使用stripos操作時忽略大小寫。
if (strpos($path, $this->clean(DEDEROOT)) !== 0) { die('Error:check Snooping out of bounds @ '.$path); } windows下是不區分路徑大小寫的,在使用strpos時我們需要忽略大小寫,修改上述內容為如下: if (stripos($path, $this->clean(DEDEROOT)) !== 0) { die('Error:check Snooping out of bounds @ '.$path); }