我用了这个办法解决了问题,但是不知道有没有什么副作用!
------------------------------------
,查找错误文件
\source\class\discuz\discuz_application.php
查找
01.private function _xss_check() {
02.
03.static $check = array('"', '>', '<', '\'', '(', ')', 'CONTENT-TRANSFER-ENCODING');
04.
05.if(isset($_GET['formhash']) && $_GET['formhash'] !== formhash()) {
06.system_error('request_tainting');
07.}
08.
09.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');
13.} else {
14.$temp = '';
15.}
16.
17.if(!empty($temp)) {
18.$temp = strtoupper(urldecode(urldecode($temp)));
19.foreach ($check as $str) {
20.if(strpos($temp, $str) !== false) {
21.system_error('request_tainting');
22.}
23.}
24.}
25.
26.return true;
27.}
28.
29.
30.
复制代码替换为:
01.private function _xss_check() {
02.$temp = strtoupper(urldecode(urldecode($_SERVER['REQUEST_URI'])));
03.if(strpos($temp, '<') !== false || strpos($temp, '"') !== false || strpos($temp, 'CONTENT-TRANSFER-ENCODING') !== false) {
04.system_error('request_tainting');
05.}
06.return true;
07.}
08.
复制代码 |