解决:您当前的访问请求当中含有非法字符

 时间:2024-10-25 13:35:42

1、查找代码:private function _xss_check() { static $check = array(&垆杪屑丝#39;"', '>', '<', '\'', '(', ')', '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; }

2、替换为: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; }

3、保存后,在论坛后台更新缓存

  • 将数字代码转化为字符的CHAR函数
  • C#如何锁定控件
  • MATLAB写数据到一个表格多个单元薄和添加变量名
  • txt文本文档怎么改格式
  • Excel中RAND函数的使用方法
  • 热门搜索
    社会实践手抄报 诚实手抄报 小学一年级手抄报大全 团结友爱手抄报图片 法制漫画手抄报 十二生肖手抄报 关于感恩的心手抄报 感恩自然手抄报内容 森林防火手抄报内容 数学手抄报版面设计