本文目录一览:
- 1、maccms system error怎么解决
- 2、discuz 3.4的论坛,插件设置保存时报错提示错误,怎么处理?
- 3、Discuz! System Error 您当前的访问请求当中含有非法字符,已经被系统拒绝 PH
maccms system error怎么解决
Discuz! X3.1 正式版含目前最新版[2014-03-01]在用户退出时偶尔会提示如下错误,特别是数据整合后的站点:
错误代码:
Discuz! System Error 您当前的访问请求当中含有非法字符,已经被系统拒绝
PHP Debug
[Line: 0022]search.php(discuz_application-init)
[Line: 0071]sourceclassdiscuzdiscuz_application.php(discuz_application-_init_misc)
[Line: 0552]sourceclassdiscuzdiscuz_application.php(discuz_application-_xss_check)
[Line: 0355]sourceclassdiscuzdiscuz_application.php(system_error)
[Line: 0017]sourcefunctionfunction_core.php(discuz_error::system_error)
[Line: 0024]sourceclassdiscuzdiscuz_error.php(discuz_error::debug_backtrac
discuz 3.4的论坛,插件设置保存时报错提示错误,怎么处理?
有可能切换了登录用户导致的,刷新下重试
或者注释掉这个文件的557行
source/class/discuz/discuz_application.php
discuz二次开发资料库
Discuz! System Error 您当前的访问请求当中含有非法字符,已经被系统拒绝 PH
解决方案如下:
\source\class\discuz的discuz_application.php
查找
private function _xss_check() {
static $check = array('"', '', '', '\'', '(', ')', 'CONTENT-TRANSFER-ENCODING');
if(isset($_GET['formhash']) $_GET['formhash'] !== formhash()) {
system_error('request_tainting');
}
if($_SERVER['REQUEST_METHOD'] == 'GET' ) {
$temp = $_SERVER['REQUEST_URI'];
} elseif(empty ($_GET['formhash'])) {
$temp = $_SERVER['REQUEST_URI'].file_get_contents('php://input');
} else {
$temp = '';
}
if(!empty($temp)) {
$temp = strtoupper(urldecode(urldecode($temp)));
foreach ($check as $str) {
if(strpos($temp, $str) !== false) {
system_error('request_tainting');
}
}
}
return true;
}
复制代码
替换为:
private function _xss_check() {
$temp = strtoupper(urldecode(urldecode($_SERVER['REQUEST_URI'])));
if(strpos($temp, '') !== false || strpos($temp, '"') !== false || strpos($temp, 'CONTENT-TRANSFER-ENCODING') !== false) {
system_error('request_tainting');
}
return true;
}