Several unsafe changes to the ecshop modifier preg_replace/e
Release: 2016-08-08 09:20:30
Original
809 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-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31