Class Smarty_Security

Description

This class does contain the security settings

Located in /libs/sysplugins/smarty_security.php (line 13)


	
			
Variable Summary
Method Summary
Smarty_Security __construct (Smarty $smarty)
boolean isTrustedModifier (string $modifier_name, object $compiler)
boolean isTrustedPHPDir (string $filepath)
boolean isTrustedPhpFunction (string $function_name, object $compiler)
boolean isTrustedPhpModifier (string $modifier_name, object $compiler)
boolean isTrustedResourceDir (string $filepath)
boolean isTrustedStaticClass (string $class_name, object $compiler)
boolean isTrustedStream (string $stream_name)
boolean isTrustedTag (string $tag_name, object $compiler)
Variables
array $allowed_modifiers = array() (line 95)

This is an array of allowed modifier plugins.

If empty no restriction by allowed_modifiers.

  • access: public
array $allowed_tags = array() (line 81)

This is an array of allowed tags.

If empty no restriction by allowed_tags.

  • access: public
boolean $allow_constants = true (line 115)

+ flag if constants can be accessed from template

  • access: public
boolean $allow_super_globals = true (line 120)

+ flag if super globals can be accessed from template

  • access: public
array $disabled_modifiers = array() (line 102)

This is an array of disabled modifier plugins.

If empty no restriction by disabled_modifiers.

  • access: public
array $disabled_tags = array() (line 88)

This is an array of disabled tags.

If empty no restriction by disabled_tags.

  • access: public
array $php_functions = array(
'isset', 'empty',
'count', 'sizeof',
'in_array', 'is_array',
'time',
'nl2br',
)
(line 57)

This is an array of trusted PHP functions.

If empty all functions are allowed. To disable all PHP functions set $php_functions = null.

  • access: public
integer $php_handling = Smarty::PHP_PASSTHRU (line 27)

This determines how Smarty handles "<?php ... ?>" tags in templates.

possible values:

  • Smarty::PHP_PASSTHRU -> echo PHP tags as they are
  • Smarty::PHP_QUOTE -> escape tags as entities
  • Smarty::PHP_REMOVE -> remove php tags
  • Smarty::PHP_ALLOW -> execute php tags

  • access: public
array $php_modifiers = array(
'escape',
'count'
)
(line 71)

This is an array of trusted PHP modifers.

If empty all modifiers are allowed. To disable all modifier set $modifiers = null.

  • access: public
array $secure_dir = array() (line 34)

This is the list of template directories that are considered secure.

$template_dir is in this list implicitly.

  • access: public
array $static_classes = array() (line 49)

This is an array of trusted static classes.

If empty access to all static classes is allowed. If set to 'none' none is allowed.

  • access: public
array $streams = array('file') (line 110)

This is an array of trusted streams.

If empty all streams are allowed. To disable all streams set $streams = null.

  • access: public
array $trusted_dir = array() (line 41)

This is an array of directories where trusted php scripts reside.

$security is disabled during their inclusion/execution.

  • access: public
string $_config_dir = null (line 141)
  • access: protected
string $_php_resource_dir = null (line 149)
  • access: protected
string $_resource_dir = null (line 133)
  • access: protected
string $_secure_dir = null (line 145)
  • access: protected
string $_template_dir = null (line 137)
  • access: protected
string $_trusted_dir = null (line 153)
  • access: protected
Methods
Constructor __construct (line 125)
  • access: public
Smarty_Security __construct (Smarty $smarty)
isTrustedModifier (line 247)

Check if modifier plugin is trusted.

  • return: true if tag is trusted
  • throws: SmartyCompilerException if modifier is not trusted
  • access: public
boolean isTrustedModifier (string $modifier_name, object $compiler)
  • string $modifier_name
  • object $compiler: compiler object
isTrustedPHPDir (line 369)

Check if directory of file resource is trusted.

  • return: true if directory is trusted
  • throws: SmartyException if PHP directory is not trusted
  • access: public
boolean isTrustedPHPDir (string $filepath)
  • string $filepath
isTrustedPhpFunction (line 163)

Check if PHP function is trusted.

  • return: true if function is trusted
  • throws: SmartyCompilerException if php function is not trusted
  • access: public
boolean isTrustedPhpFunction (string $function_name, object $compiler)
  • string $function_name
  • object $compiler: compiler object
isTrustedPhpModifier (line 199)

Check if PHP modifier is trusted.

  • return: true if modifier is trusted
  • throws: SmartyCompilerException if modifier is not trusted
  • access: public
boolean isTrustedPhpModifier (string $modifier_name, object $compiler)
  • string $modifier_name
  • object $compiler: compiler object
isTrustedResourceDir (line 291)

Check if directory of file resource is trusted.

  • return: true if directory is trusted
  • throws: SmartyException if directory is not trusted
  • access: public
boolean isTrustedResourceDir (string $filepath)
  • string $filepath
isTrustedStaticClass (line 181)

Check if static class is trusted.

  • return: true if class is trusted
  • throws: SmartyCompilerException if static class is not trusted
  • access: public
boolean isTrustedStaticClass (string $class_name, object $compiler)
  • string $class_name
  • object $compiler: compiler object
isTrustedStream (line 275)

Check if stream is trusted.

  • return: true if stream is trusted
  • throws: SmartyException if stream is not trusted
  • access: public
boolean isTrustedStream (string $stream_name)
  • string $stream_name
isTrustedTag (line 217)

Check if tag is trusted.

  • return: true if tag is trusted
  • throws: SmartyCompilerException if modifier is not trusted
  • access: public
boolean isTrustedTag (string $tag_name, object $compiler)
  • string $tag_name
  • object $compiler: compiler object

Documentation generated on Sat, 24 Sep 2011 20:24:09 +0200 by phpDocumentor 1.4.1