mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
Fixed a bug with quoted strings inside if statements.
This commit is contained in:
6
NEWS
6
NEWS
@@ -1,5 +1,7 @@
|
|||||||
- added security features for third party template editing (Monte,Andrei)
|
- fixed a bug with passing quoted arguments to modifiers inside {if}
|
||||||
- added assign custom function, documented (Monte)
|
statements. (Andrei, Sam Beckwith)
|
||||||
|
- added security features for third party template editing. (Monte, Andrei)
|
||||||
|
- added assign custom function, documented. (Monte)
|
||||||
- fixed a problem with putting $ followed by numbers inside {strip} and
|
- fixed a problem with putting $ followed by numbers inside {strip} and
|
||||||
{/strip} tags. (Andrei)
|
{/strip} tags. (Andrei)
|
||||||
- fixed Config_File class to allow empty config paths (defaults to current
|
- fixed Config_File class to allow empty config paths (defaults to current
|
||||||
|
@@ -476,7 +476,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | # match all double quoted strings allowed escaped double quotes
|
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | # match all double quoted strings allowed escaped double quotes
|
||||||
\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | # match all single quoted strings allowed escaped single quotes
|
\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | # match all single quoted strings allowed escaped single quotes
|
||||||
[()] | # match parentheses
|
[()] | # match parentheses
|
||||||
[^"\'\s()]+ # match any other token that is not any of the above
|
[^\s()]+ # match any other token that is not any of the above
|
||||||
)/x', $tag_args, $match);
|
)/x', $tag_args, $match);
|
||||||
$tokens = $match[0];
|
$tokens = $match[0];
|
||||||
|
|
||||||
|
@@ -476,7 +476,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | # match all double quoted strings allowed escaped double quotes
|
"[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | # match all double quoted strings allowed escaped double quotes
|
||||||
\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | # match all single quoted strings allowed escaped single quotes
|
\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | # match all single quoted strings allowed escaped single quotes
|
||||||
[()] | # match parentheses
|
[()] | # match parentheses
|
||||||
[^"\'\s()]+ # match any other token that is not any of the above
|
[^\s()]+ # match any other token that is not any of the above
|
||||||
)/x', $tag_args, $match);
|
)/x', $tag_args, $match);
|
||||||
$tokens = $match[0];
|
$tokens = $match[0];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user