China
  
 | 
 
 本帖最后由 AlanJia2017 于 2018-7-5 18:37 编辑  
 
source\function\function_core.php中checkrobot函数 
原本代码 
-  if(strpos($useragent, 'http://') === false && dstrpos($useragent, $kw_browsers)) return false;
 
  Copy the Code 815版本更新后的代码 
-  if(preg_match('/https?:\/\//is') && dstrpos($useragent, $kw_browsers)) return false;
 
  Copy the Code preg_match少了一个参数。 
 
正确的应该是这样 ? 
- if(!preg_match('/https?:\/\//is',$useragent) && dstrpos($useragent, $kw_browsers)) return false;
 
  Copy the Code 且,最好是做http的兼容,比如是这样子。- if(!preg_match('/^(http:\/\/|https:\/\/).*$/',$useragent) && dstrpos($useragent, $kw_browsers)) return false;
 
  Copy the Code 搜索引擎的UA有的还是留的http协议的。 
比如百度的: 
https://ziyuan.baidu.com/wiki/990 
 
题外话想说的是,815更新的https细节修正似乎根本没有为http留下任何余地。不考虑兼容?自己的网站强制https没问题,但是第三方网站就不好说了。你确定所有第三方链接都100%是https协议的? 
 
 
 |   
 
 
 
 |