管理員
積分信息:
威望:6087
金錢:9076810
貢獻:6198
儲蓄:2146643647
|
出現請求當中含有非法字符,已經被系統拒絕的錯誤的解決方法
當網站打開幾個頁面,在其中一個頁麵點退出是正常的,如果再在其他頁麵點退出,仍然提示您當前的訪問請求當中含有非法字符,已經被系統拒絕的錯誤。
在官網這裡測試也是如此。可自行測試。求助無果唯有自行解決了。
DX3.1 20140101版本已修正語言包,但是source\class\discuz的discuz_application.php這個文件並沒有作修正。
致使 仍出現這個錯誤。
解決方法:
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;
- }
複製代碼
替換
|
|