bug位置function_core.php第2114行的ipbanned函数,估计是涉及到discuzx的所有版本啦:
function ipbanned($onlineip) { global $_G; if($_G['setting']['ipaccess'] && !ipaccess($onlineip, $_G['setting']['ipaccess'])) { return TRUE; } loadcache('ipbanned'); if(empty($_G['cache']['ipbanned'])) { return FALSE; } else { if($_G['cache']['ipbanned']['expiration'] < TIMESTAMP) { require_once libfile('function/cache'); updatecache('ipbanned'); } //modify by zhangwenbo at 2011-11-03 10:37 $onlineip = str_replace('.', '\\.', $onlineip); if(strpos($_G['cache']['ipbanned']['regexp'], $onlineip) === false) { return false; } return true; //return preg_match("/^(".$_G['cache']['ipbanned']['regexp'].")$/", $onlineip); } }错误原因:preg_match的第一个参数只能接受40066个字节的字符串,否则将出现“Warning: preg_match(): Compilation failed: regular expression is too large at offset 40066 in E:\www\test\test.php on line 6”,但对于一些大站来讲,这40066个字节是远远不够用的,因此我改如上。当然,一般的小站肯定是不会碰到这种问题的啦,呵呵...