DNSPod 新春好礼 - 域名低至 1 元起,代金券大礼包暖心送!问题描述:由于Discuz!X 的Xss安全机制,会对游客访问时进行字符内容安全检查,特别是游客使用搜索功能时,搜索容易出现 "您当前访问请求中含有非法字符",已被系统拒绝" 。
解决方案:将这个提示改为跳转用户登录
解决步骤:
打开:/source/class/discuz/discuz_application.php
搜索:
- if(isset($_GET['formhash']) && $_GET['formhash'] !== formhash()) {
- system_error('request_tainting');
- }
复制代码 改为:
- if(isset($_GET['formhash']) && $_GET['formhash'] !== formhash()) {
- //system_error('request_tainting');
- //header('HTTP/1.1 301 Moved Permanently');
- header("Location: https://".$_SERVER['HTTP_HOST']."/member.php?mod=logging&action=login");
- exit;
- }
复制代码 备注:https根据实际情况修改http
感谢crx349,来自:https://www.discuz.net/thread-3849811-1-1.html
|