故障描述:
退出登录时出现”您当前的访问请求当中含有非法字符,已经被系统拒绝“错误。如下图:
解决方法:
打开 sourceclassdiscuzdiscuz_application.php 文件
找到
private function _xss_check() {
static $check = array(&#39;"&#39;, &#39;>&#39;, &#39;<&#39;, &#39;&#39;&#39;, &#39;(&#39;, &#39;)&#39;, &#39;CONTENT-TRANSFER-ENCODING&#39;);
if(isset($_GET[&#39;formhash&#39;]) && $_GET[&#39;formhash&#39;] !== formhash()) {
system_error(&#39;request_tainting&#39;);
}
if($_SERVER[&#39;REQUEST_METHOD&#39;] == &#39;GET&#39; ) {
$temp = $_SERVER[&#39;REQUEST_URI&#39;];
} elseif(empty ($_GET[&#39;formhash&#39;])) {
$temp = $_SERVER[&#39;REQUEST_URI&#39;].file_get_contents(&#39;php://input&#39;);
} else {
$temp = &#39;&#39;;
}
if(!empty($temp)) {
$temp = strtoupper(urldecode(urldecode($temp)));
foreach ($check as $str) {
if(strpos($temp, $str) !== false) {
system_error(&#39;request_tainting&#39;);
}
}
}
return true;
}
修改为
private function _xss_check() {
$temp = strtoupper(urldecode(urldecode($_SERVER[&#39;REQUEST_URI&#39;])));
if(strpos($temp, &#39;<&#39;) !== false || strpos($temp, &#39;"&#39;) !== false || strpos($temp, &#39;CONTENT-TRANSFER-ENCODING&#39;) !== false) {
system_error(&#39;request_tainting&#39;);
}
return true;
}

2KB项目(www.2kb.com,源码交易平台),提供担保交易、源码交易、虚拟商品、在家创业、在线创业、任务交易、网站设计、软件设计、网络兼职、站长交易、域名交易、链接买卖、网站交易、广告买卖、站长培训、建站美工等服务