discuz 搜索时“您当前的访问请求当中含有非法字符,已经被系统拒绝”
2016-09-11 14:33:48
13532
Discuz!x3.1故障描述:垃圾站博主发现升级Discuz! x3.1版本后,退出登录或以游客状态搜索时出现“您当前的访问请求当中含有非法字符,已经被系统拒绝”的错误。
解决方案如下:sourceclassdiscuz的discuz_application.php 查找
1 | private function _xss_check() { |
3 | static $check = array('"', '>', '<', ''', '(', ')', 'CONTENT-TRANSFER-ENCODING'); |
5 | if(isset($_GET['formhash']) && $_GET['formhash'] !== formhash()) { |
6 | system_error('request_tainting'); |
9 | if($_SERVER['REQUEST_METHOD'] == 'GET' ) { |
10 | $temp = $_SERVER['REQUEST_URI']; |
11 | } elseif(empty ($_GET['formhash'])) { |
12 | $temp =$_SERVER['REQUEST_URI'].file_get_contents('php://input'); |
18 | $temp = strtoupper(urldecode(urldecode($temp))); |
19 | foreach ($check as $str) { |
20 | if(strpos($temp, $str) !== false) { |
21 | system_error('request_tainting'); |
替换为:
1 | private function _xss_check() { |
2 | $temp =strtoupper(urldecode(urldecode($_SERVER['REQUEST_URI']))); |
3 | if(strpos($temp, '<') !== false || strpos($temp, '"') !== false || strpos($temp, 'CONTENT-TRANSFER-ENCODING') !== false) { |
4 | system_error('request_tainting'); |
-
售前咨询
售前咨询服务时间:09:00-23:30
售前值班
4006-75-4006
咨询热线:
4006-75-4006(09:00-23:30)
0871-6388 6388 (总机)(工作日 09:00-18:00)
-
售后咨询
售后咨询服务时间:00:00-24:00
24H值班技术
4006-75-4006
-
备案咨询
备案咨询服务时间:09:00-18:00(工作日)
备案专业客服
0871-6388 6388
-
电话
0871-6388 6388 (总机)
- 工单
-
二维码
-
TOP