国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > Discuz > 正文

Discuz“您當前的訪問請求當中含有非法字符“的解決方法

2024-09-11 09:06:38
字體:
來源:轉載
供稿:網友
 
故障描述:
退出登錄時出現”您當前的訪問請求當中含有非法字符,已經被系統拒絕“錯誤。如下圖:
解決方法:
打開 /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;
}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 谷城县| 浦县| 周至县| 宽城| 乡宁县| 洞头县| 方山县| 鄢陵县| 台湾省| 陆河县| 东安县| 沭阳县| 海林市| 福清市| 苗栗县| 利川市| 阜宁县| 绵阳市| 青阳县| 潢川县| 大足县| 延长县| 石泉县| 米脂县| 元阳县| 陆河县| 青冈县| 波密县| 延川县| 荣成市| 星座| 横山县| 连云港市| 宁陕县| 石台县| 合肥市| 淄博市| 云梦县| 慈溪市| 河曲县| 永年县|