Smarty_Security Klassenreferenz

Öffentliche Methoden

 __construct ($smarty)
 
 isTrustedPhpFunction ($function_name, $compiler)
 
 isTrustedStaticClass ($class_name, $compiler)
 
 isTrustedStaticClassAccess ($class_name, $params, $compiler)
 
 isTrustedPhpModifier ($modifier_name, $compiler)
 
 isTrustedTag ($tag_name, $compiler)
 
 isTrustedSpecialSmartyVar ($var_name, $compiler)
 
 isTrustedModifier ($modifier_name, $compiler)
 
 isTrustedConstant ($const, $compiler)
 
 isTrustedStream ($stream_name)
 
 isTrustedResourceDir ($filepath)
 
 isTrustedUri ($uri)
 
 isTrustedPHPDir ($filepath)
 
 startTemplate ($template)
 
 exitTemplate ($template)
 

Datenfelder

 $php_handling = Smarty::PHP_PASSTHRU
 
 $secure_dir = array()
 
 $trusted_dir = array()
 
 $trusted_uri = array()
 
 $trusted_constants = array()
 
 $static_classes = array()
 
 $trusted_static_methods = array()
 
 $trusted_static_properties = array()
 
 $php_functions
 
 $php_modifiers
 
 $allowed_tags = array()
 
 $disabled_tags = array()
 
 $allowed_modifiers = array()
 
 $disabled_modifiers = array()
 
 $disabled_special_smarty_vars = array()
 
 $streams = array('file')
 
 $allow_constants = true
 
 $allow_super_globals = true
 
 $max_template_nesting = 0
 

Geschützte Attribute

 $_resource_dir = null
 
 $_template_dir = null
 
 $_config_dir = null
 
 $_secure_dir = null
 
 $_php_resource_dir = null
 
 $_trusted_dir = null
 

Private Attribute

 $_current_template_nesting = 0
 

Ausführliche Beschreibung

This class does contain the security settings

Definiert in Zeile 22 der Datei smarty_security.php.

Beschreibung der Konstruktoren und Destruktoren

__construct (   $smarty)
Parameter
Smarty$smarty

Definiert in Zeile 230 der Datei smarty_security.php.

Dokumentation der Elementfunktionen

exitTemplate (   $template)

Exit template processing

Parameter
$template

Definiert in Zeile 638 der Datei smarty_security.php.

isTrustedConstant (   $const,
  $compiler 
)

Check if constants are enabled or trusted

Parameter
string$constcontant name
object$compilercompiler object
Rückgabe
bool

Definiert in Zeile 427 der Datei smarty_security.php.

isTrustedModifier (   $modifier_name,
  $compiler 
)

Check if modifier plugin is trusted.

Parameter
string$modifier_name
object$compilercompiler object
Rückgabe
boolean true if tag is trusted
Ausnahmebehandlung
SmartyCompilerExceptionif modifier is not trusted

Definiert in Zeile 397 der Datei smarty_security.php.

isTrustedPHPDir (   $filepath)

Check if directory of file resource is trusted.

Parameter
string$filepath
Rückgabe
boolean true if directory is trusted
Ausnahmebehandlung
SmartyExceptionif PHP directory is not trusted

Definiert in Zeile 578 der Datei smarty_security.php.

Benutzt $trusted_dir.

isTrustedPhpFunction (   $function_name,
  $compiler 
)

Check if PHP function is trusted.

Parameter
string$function_name
object$compilercompiler object
Rückgabe
boolean true if function is trusted
Ausnahmebehandlung
SmartyCompilerExceptionif php function is not trusted

Definiert in Zeile 244 der Datei smarty_security.php.

isTrustedPhpModifier (   $modifier_name,
  $compiler 
)

Check if PHP modifier is trusted.

Parameter
string$modifier_name
object$compilercompiler object
Rückgabe
boolean true if modifier is trusted
Ausnahmebehandlung
SmartyCompilerExceptionif modifier is not trusted

Definiert in Zeile 324 der Datei smarty_security.php.

isTrustedResourceDir (   $filepath)

Check if directory of file resource is trusted.

Parameter
string$filepath
Rückgabe
boolean true if directory is trusted
Ausnahmebehandlung
SmartyExceptionif directory is not trusted

Definiert in Zeile 471 der Datei smarty_security.php.

Benutzt $_config_dir, $_template_dir und $secure_dir.

isTrustedSpecialSmartyVar (   $var_name,
  $compiler 
)

Check if special $smarty variable is trusted.

Parameter
string$var_name
object$compilercompiler object
Rückgabe
boolean true if tag is trusted
Ausnahmebehandlung
SmartyCompilerExceptionif modifier is not trusted

Definiert in Zeile 377 der Datei smarty_security.php.

isTrustedStaticClass (   $class_name,
  $compiler 
)

Check if static class is trusted.

Parameter
string$class_name
object$compilercompiler object
Rückgabe
boolean true if class is trusted
Ausnahmebehandlung
SmartyCompilerExceptionif static class is not trusted

Definiert in Zeile 264 der Datei smarty_security.php.

Wird benutzt von isTrustedStaticClassAccess().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

isTrustedStaticClassAccess (   $class_name,
  $params,
  $compiler 
)

Check if static class method/property is trusted.

Parameter
string$class_name
string$params
object$compilercompiler object
Rückgabe
boolean true if class method is trusted
Ausnahmebehandlung
SmartyCompilerExceptionif static class method is not trusted

Definiert in Zeile 285 der Datei smarty_security.php.

Benutzt $trusted_static_methods, $trusted_static_properties und isTrustedStaticClass().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

isTrustedStream (   $stream_name)

Check if stream is trusted.

Parameter
string$stream_name
Rückgabe
boolean true if stream is trusted
Ausnahmebehandlung
SmartyExceptionif stream is not trusted

Definiert in Zeile 454 der Datei smarty_security.php.

isTrustedTag (   $tag_name,
  $compiler 
)

Check if tag is trusted.

Parameter
string$tag_name
object$compilercompiler object
Rückgabe
boolean true if tag is trusted
Ausnahmebehandlung
SmartyCompilerExceptionif modifier is not trusted

Definiert in Zeile 344 der Datei smarty_security.php.

isTrustedUri (   $uri)

Check if URI (e.g. {fetch} or {html_image}) is trusted To simplify things, isTrustedUri() resolves all input to "{$PROTOCOL}://{$HOSTNAME}". So "http://username:password@hello.world.example.org:8080/some-path?some=query-string" is reduced to "http://hello.world.example.org" prior to applying the patters from $trusted_uri.

Parameter
string$uri
Rückgabe
boolean true if URI is trusted
Ausnahmebehandlung
SmartyExceptionif URI is not trusted $trusted_uri for list of patterns to match against $uri

Definiert in Zeile 555 der Datei smarty_security.php.

startTemplate (   $template)

Start template processing

Parameter
$template
Ausnahmebehandlung
SmartyException

Definiert in Zeile 626 der Datei smarty_security.php.

Dokumentation der Datenelemente

$_config_dir = null
protected

Definiert in Zeile 207 der Datei smarty_security.php.

Wird benutzt von isTrustedResourceDir().

$_current_template_nesting = 0
private

Definiert in Zeile 189 der Datei smarty_security.php.

$_php_resource_dir = null
protected

Definiert in Zeile 219 der Datei smarty_security.php.

$_resource_dir = null
protected

Definiert in Zeile 195 der Datei smarty_security.php.

$_secure_dir = null
protected

Definiert in Zeile 213 der Datei smarty_security.php.

$_template_dir = null
protected

Definiert in Zeile 201 der Datei smarty_security.php.

Wird benutzt von isTrustedResourceDir().

$_trusted_dir = null
protected

Definiert in Zeile 225 der Datei smarty_security.php.

$allow_constants = true

Definiert in Zeile 171 der Datei smarty_security.php.

$allow_super_globals = true

Definiert in Zeile 177 der Datei smarty_security.php.

$allowed_modifiers = array()

Definiert in Zeile 144 der Datei smarty_security.php.

$allowed_tags = array()

Definiert in Zeile 130 der Datei smarty_security.php.

$disabled_modifiers = array()

Definiert in Zeile 151 der Datei smarty_security.php.

$disabled_special_smarty_vars = array()

Definiert in Zeile 157 der Datei smarty_security.php.

$disabled_tags = array()

Definiert in Zeile 137 der Datei smarty_security.php.

$max_template_nesting = 0

Definiert in Zeile 183 der Datei smarty_security.php.

$php_functions
Initialisierung:
= array(
'isset', 'empty',
'count', 'sizeof',
'in_array', 'is_array',
'time',
)

Definiert in Zeile 106 der Datei smarty_security.php.

$php_handling = Smarty::PHP_PASSTHRU

Definiert in Zeile 36 der Datei smarty_security.php.

$php_modifiers
Initialisierung:
= array(
'escape',
'count',
'nl2br',
)

Definiert in Zeile 119 der Datei smarty_security.php.

$secure_dir = array()

Definiert in Zeile 43 der Datei smarty_security.php.

Wird benutzt von isTrustedResourceDir().

$static_classes = array()

Definiert in Zeile 70 der Datei smarty_security.php.

$streams = array('file')

Definiert in Zeile 165 der Datei smarty_security.php.

$trusted_constants = array()

Definiert in Zeile 62 der Datei smarty_security.php.

$trusted_dir = array()

Definiert in Zeile 50 der Datei smarty_security.php.

Wird benutzt von isTrustedPHPDir().

$trusted_static_methods = array()

Definiert in Zeile 84 der Datei smarty_security.php.

Wird benutzt von isTrustedStaticClassAccess().

$trusted_static_properties = array()

Definiert in Zeile 98 der Datei smarty_security.php.

Wird benutzt von isTrustedStaticClassAccess().

$trusted_uri = array()

Definiert in Zeile 56 der Datei smarty_security.php.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.