Several unsafe changes to the ecshop modifier preg_replace/e
Release: 2016-08-08 09:20:30
Original
740 people have browsed it
Mainly concentrated in the upload/includes/cls_template.php file:
1: line 300:
Original statement:
return preg_replace("/{([^}{n]*)}/e" , "$this->select('\1');", $source);
Modified to:
return preg_replace_callback("/{([^}{n]*)}/", function ($r) { return $this->select($r[1]); }, $source);
2: line 495:
Original sentence:
$out = "
Modified to:
$replacement = preg_replace_callback("/('\$[^,]+)/" ,
function($matcher ){
,
var_export($t, true));
3: line 554:
//zuimoban.com Reprint without URL, wooden JJ
Original sentence:
$val = preg_replace("/[([^[]]*)]/eis", "'.'.str_replace('$',' $','\1')", $val);
‐ ‑ out right out of's'ce's' Out’‐‐‐‐‐‐‐‐‐ out‐ out off out. $matcher) {
,
$val);
4: line 1071:
Original statement:
$replacement = "'{inc file='.strtolower('\1'). '}'" ;
$source = preg_replace($pattern, $replacement, $source);
Modified to:
$source = preg_replace_callback($pattern,
function ($matcher) {
$source);
Original address: http://www.moke8.com /article-10688-1.html
The above introduces several unsafe changes to the ecshop modifier preg_replace/e, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2024-08-17 08:50:02
-
2024-08-17 08:42:31
-
2024-08-17 07:34:37
-
2024-08-17 07:34:32
-
2024-08-17 07:31:35
-
2024-08-17 07:06:02
-
2024-08-17 07:05:01
-
2024-08-17 07:04:31
-
2024-08-17 07:02:01
-
2024-08-17 06:59:32