mirror of
https://github.com/smarty-php/smarty.git
synced 2026-08-06 21:44:17 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4537d8aae6 | |||
| 34531edb4c |
+5
-1
@@ -1,4 +1,8 @@
|
||||
===== 3.1.26===== (18.06.2015)
|
||||
===== 3.1.27===== (18.06.2015)
|
||||
18.06.2015
|
||||
- bugfix another update on file path normalization failed on path containing something like "/.foo/" https://github.com/smarty-php/smarty/issues/56
|
||||
|
||||
===== 3.1.26===== (18.06.2015)
|
||||
18.06.2015
|
||||
- bugfix file path normalization failed on path containing something like "/.foo/" https://github.com/smarty-php/smarty/issues/56
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* @author Uwe Tews
|
||||
* @author Rodney Rehm
|
||||
* @package Smarty
|
||||
* @version 3.1.26
|
||||
* @version 3.1.27
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.26';
|
||||
const SMARTY_VERSION = '3.1.27';
|
||||
|
||||
/**
|
||||
* define variable scopes
|
||||
|
||||
@@ -124,9 +124,9 @@ class Smarty_Internal_Resource_File extends Smarty_Resource
|
||||
if ($path[0] == '.') {
|
||||
$path = getcwd() . DS . $path;
|
||||
}
|
||||
$path = preg_replace('#[\\\/]+([.][\\\/]+)*([.](?![.]))?#', DS, $path);
|
||||
while (strrpos($path, DS . '.') !== false) {
|
||||
$path = preg_replace('#([\\\/]([^\\\/]+[\\\/]){2}([.][.][\\\/]){2})|([\\\/][^\\\/]+[\\\/][.][.][\\\/]?)#', DS, $path);
|
||||
$path = preg_replace('#[\\\/]+([.][\\\/]+)*#', DS, $path);
|
||||
while (strrpos($path, '.' . DS) !== false) {
|
||||
$path = preg_replace('#([\\\/]([^\\\/]+[\\\/]){2}([.][.][\\\/]){2})|([\\\/][^\\\/]+[\\\/][.][.][\\\/])#', DS, $path);
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user