discuz 搜索時(shí)“您當(dāng)前的訪問請求當(dāng)中含有非法字符,已經(jīng)被系統(tǒng)拒絕”
Discuz!x3.1故障描述:垃圾站博主發(fā)現(xiàn)升級Discuz! x3.1版本后,退出登錄或以游客狀態(tài)搜索時(shí)出現(xiàn)“您當(dāng)前的訪問請求當(dāng)中含有非法字符,已經(jīng)被系統(tǒng)拒絕”的錯(cuò)誤。
解決方案如下: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'); |
-
售前咨詢
售前咨詢服務(wù)時(shí)間:09:00-23:30
售前值班
4006-75-4006
咨詢熱線:
4006-75-4006(09:00-23:30)
0871-6388 6388 (總機(jī))(工作日 09:00-18:00)
-
售后咨詢
售后咨詢服務(wù)時(shí)間:00:00-24:00
24H值班技術(shù)
4006-75-4006
-
備案咨詢
備案咨詢服務(wù)時(shí)間:09:00-18:00(工作日)
備案專業(yè)客服
0871-6388 6388
-
電話
0871-6388 6388 (總機(jī))
- 工單
-
二維碼
-
TOP