|
|
|
- 【不是正版应用解决方法】
- 修改文件:论坛根目录\source\function里面的function_cloudaddons.php
- 2.编辑function_cloudaddons.php,查找代码:
-
- cpmsg('cloudaddons_genuine_message', '', 'error', array('addonid' => $addonid));
-
- 注释掉,X3.1及之前版本的大概在99行,X3.2版本的大概在97行,把这行修改为
- /*cpmsg('cloudaddons_genuine_message', '', 'error', array('addonid' => $addonid));*/
- ----------------------------------------------------------------------------------------------
- 【插件设计者启动方法】
- 打开 config/config_global.php 文件,在文件结尾添加以下代码开启插件设计者模式。
- $_config['plugindeveloper'] = 1;
- -----------------------------------------------------------------------------------------------
- 【非法请求解决方法】
- 解决方案如下:
- \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;
- }
- ------------------------------------------------------------------------------------------------------
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|