TA的每日心情 | 开心 2024-11-7 11:01 |
---|
签到天数: 850 天 [LV.10]以坛为家III
管理员
- 积分
- 18567
|
Discuz论坛游客未登录搜索后出现 Discuz! System Error 错误!
查找文件 \source\class\discuz\discuz_application.php
查找代码
- 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;
- }
- private function _get_client_ip() {
- $ip = $_SERVER['REMOTE_ADDR'];
- if (isset($_SERVER['HTTP_CLIENT_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_CLIENT_IP'])) {
- $ip = $_SERVER['HTTP_CLIENT_IP'];
- } elseif(isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches)) {
- foreach ($matches[0] AS $xip) {
- if (!preg_match('#^(10|172\.16|192\.168)\.#', $xip)) {
- $ip = $xip;
- break;
- }
- }
- }
- return $ip;
- }
复制代码 替换
- 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;
- }
复制代码 上传覆盖,后台更新缓存。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|