Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F947991
smarty_security.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
smarty_security.php
View Options
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage Security
* @author Uwe Tews
*/
/**
* This class does contain the security settings
*/
class
Smarty_Security
{
/**
* This determines how Smarty handles "<?php ... ?>" tags in templates.
* possible values:
* <ul>
* <li>SMARTY_PHP_PASSTHRU -> echo PHP tags as they are</li>
* <li>SMARTY_PHP_QUOTE -> escape tags as entities</li>
* <li>SMARTY_PHP_REMOVE -> remove php tags</li>
* <li>SMARTY_PHP_ALLOW -> execute php tags</li>
* </ul>
*
* @var integer
*/
public
$php_handling
=
SMARTY_PHP_PASSTHRU
;
/**
* This is the list of template directories that are considered secure.
* One directory per array element.
* $template_dir is in this list implicitly.
*
* @var array
*/
public
$secure_dir
=
array
();
/**
* This is an array of directories where trusted php scripts reside.
* {@link $security} is disabled during their inclusion/execution.
*
* @var array
*/
public
$trusted_dir
=
array
();
/**
* This is an array of trusted PHP functions.
*
* If empty all functions are allowed.
* If set to 'none' none is allowed.
* @var array
*/
public
$php_functions
=
array
(
'isset'
,
'empty'
,
'count'
,
'sizeof'
,
'in_array'
,
'is_array'
,
'time'
,
'nl2br'
);
/**
* This is an array of trusted modifers.
*
* If empty all modifiers are allowed.
* If set to 'none' none is allowed.
* @var array
*/
public
$modifiers
=
array
(
'escape'
,
'count'
);
/**
* This is an array of trusted streams.
*
* If empty all streams are allowed.
* If set to 'none' none is allowed.
* @var array
*/
public
$streams
=
array
(
'file'
);
/**
+ flag if constants can be accessed from template
*/
public
$allow_constants
=
true
;
/**
+ flag if {php} tag can be executed
*/
public
$allow_php_tag
=
false
;
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Apr 26, 14:15 (10 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25850
Default Alt Text
smarty_security.php (1 KB)
Attached To
rZED Zed
Event Timeline
Log In to Comment