最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ecshop修饰符preg_replace/e不安全的几处改动
时间:2022-06-25 16:11:53 编辑:袖梨 来源:一聚教程网
主要集中在 upload/includes/cls_template.php 文件中:
1:line 300 :
原语句:
return preg_replace("/{([^}{n]*)}/e", "$this->select('\1');", $source);
修改为:
return preg_replace_callback("/{([^}{n]*)}/", function($r) { return $this->select($r[1]); }, $source);
2:line 495:
原语句:
$out = "pslashes(trim('\1','''));", var_export($t, true)) . ";n";
修改为:
$replacement = preg_replace_callback("/('\$[^,]+)/" ,
function($matcher){
return stripslashes(trim($matcher[1],'''));
},
var_export($t, true));
$out = "
3:line 554: //zuimoban.com 转载不带网址,木JJ
原语句:
$val = preg_replace("/[([^[]]*)]/eis", "'.'.str_replace('$','$','\1')", $val);
修改为:
$val = preg_replace_callback("/[([^[]]*)]/is",
function ($matcher) {
return '.'.str_replace('$','$',$matcher[1]);
},
$val);
4:line 1071:
原语句:
$replacement = "'{include file='.strtolower('\1'). '}'";
$source = preg_replace($pattern, $replacement, $source);
修改为:
$source = preg_replace_callback($pattern,
function ($matcher) {
return '{include file=' . strtolower($matcher[1]). '}';
},
$source);
相关文章
- 影视大全软件哪款好-既能看电视又能看电影的软件 05-07
- 全新怪兽游戏《Beastlink》宣布登陆PC及主机平台 05-07
- 歪动漫画韩漫全集免费-歪歪漫画热门连载在线看 05-07
- 云之国阴燃高原最难宝箱怎么解谜 05-07
- 哥布林维克窃贼大亨银行顶层档案室玩法攻略 05-07
- 漫蛙漫画-官方正版入口网页 05-07