mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Treat $_SESSION specially in template code
https://xetown.com/questions/1522739
This commit is contained in:
parent
0d74df4dc4
commit
76c6ef56f2
1 changed files with 1 additions and 1 deletions
|
|
@ -1039,7 +1039,7 @@ class TemplateHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
return preg_replace_callback('@(?<!::|\\\\|(?<!eval\()\')\$([a-z_][a-z0-9_]*)@i', function($matches) {
|
return preg_replace_callback('@(?<!::|\\\\|(?<!eval\()\')\$([a-z_][a-z0-9_]*)@i', function($matches) {
|
||||||
if (preg_match('/^(?:GLOBALS|_SERVER|_COOKIE|_GET|_POST|_REQUEST|__Context|this|lang)$/', $matches[1]))
|
if (preg_match('/^(?:GLOBALS|_SERVER|_COOKIE|_GET|_POST|_REQUEST|_SESSION|__Context|this|lang)$/', $matches[1]))
|
||||||
{
|
{
|
||||||
return '$' . $matches[1];
|
return '$' . $matches[1];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue