XOOPS API 2.5.11 Beta1  UI v0.5
Réalisé par monxoops.fr
Référence de la classe FilterInput
+ Graphe d'héritage de FilterInput:

Fonctions membres publiques

 process ($source)
 

Fonctions membres publiques statiques

static getInstance ( $tagsArray=array(), $attrArray=array(), $tagsMethod=0, $attrMethod=0, $xssAuto=1)
 
static clean ($source, $type='string')
 
 cleanVar ($source, $type='string')
 

Fonctions membres protégées

 __construct ( $tagsArray=array(), $attrArray=array(), $tagsMethod=0, $attrMethod=0, $xssAuto=1)
 
 remove ($source)
 
 filterTags ($source)
 
 filterAttr ($attrSet)
 
 decode ($source)
 

Attributs protégés

 $tagsArray
 
 $attrArray
 
 $tagsMethod
 
 $attrMethod
 
 $xssAuto
 
 $tagBlacklist
 
 $attrBlacklist = array('action', 'background', 'codebase', 'dynsrc', 'lowsrc')
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $tagsArray = array(),
  $attrArray = array(),
  $tagsMethod = 0,
  $attrMethod = 0,
  $xssAuto = 1 
)
protected

Constructor

Paramètres
array$tagsArray- list of user-defined tags
array$attrArray- list of user-defined attributes
int$tagsMethod- 0 = allow just user-defined, 1 = allow all but user-defined
int$attrMethod- 0 = allow just user-defined, 1 = allow all but user-defined
int$xssAuto- 0 = only auto clean essentials, 1 = allow clean blacklisted tags/attr

Documentation des fonctions membres

◆ clean()

static clean (   $source,
  $type = 'string' 
)
static

Static method to be called by another php script. Clean the supplied input using the default filter

Paramètres
mixed$sourceInput string/array-of-string to be 'cleaned'
string$typeReturn/cleaning type for the variable, one of (INTEGER, FLOAT, BOOLEAN, WORD, ALPHANUM, CMD, BASE64, STRING, ARRAY, PATH, USERNAME, WEBURL, EMAIL, IP)
Renvoie
mixed 'Cleaned' version of input parameter

◆ cleanVar()

cleanVar (   $source,
  $type = 'string' 
)
static

Method to be called by another php script. Processes for XSS and specified bad code according to rules supplied when this instance was instantiated.

Paramètres
mixed$sourceInput string/array-of-string to be 'cleaned'
string$typeReturn/cleaning type for the variable, one of (INTEGER, FLOAT, BOOLEAN, WORD, ALPHANUM, CMD, BASE64, STRING, ARRAY, PATH, USERNAME, WEBURL, EMAIL, IP)
Renvoie
mixed 'Cleaned' version of input parameter

◆ decode()

decode (   $source)
protected

Try to convert to plaintext

Paramètres
String$sourcestring to decode
Renvoie
String $source decoded

◆ filterAttr()

filterAttr (   $attrSet)
protected

Internal method to strip a tag of certain attributes

Paramètres
array$attrSetattributes
Renvoie
array $newSet stripped attributes

◆ filterTags()

filterTags (   $source)
protected

Internal method to strip a string of certain tags

Paramètres
String$source- input string to be 'cleaned'
Renvoie
String $source - 'cleaned' version of input parameter

◆ getInstance()

static getInstance (   $tagsArray = array(),
  $attrArray = array(),
  $tagsMethod = 0,
  $attrMethod = 0,
  $xssAuto = 1 
)
static

Returns an input filter object, only creating it if it does not already exist.

This method must be invoked as: $filter = FilterInput::getInstance();

Paramètres
array$tagsArraylist of user-defined tags
array$attrArraylist of user-defined attributes
int$tagsMethodWhiteList method = 0, BlackList method = 1
int$attrMethodWhiteList method = 0, BlackList method = 1
int$xssAutoOnly auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
Renvoie
FilterInput object.

◆ process()

process (   $source)

Method to be called by another php script. Processes for XSS and any specified bad code.

Paramètres
mixed$source- input string/array-of-string to be 'cleaned'
Renvoie
string $source - 'cleaned' version of input parameter

◆ remove()

remove (   $source)
protected

Internal method to iteratively remove all unwanted tags and attributes

Paramètres
String$source- input string to be 'cleaned'
Renvoie
String $source - 'cleaned' version of input parameter

Documentation des champs

◆ $attrArray

$attrArray
protected

◆ $attrBlacklist

$attrBlacklist = array('action', 'background', 'codebase', 'dynsrc', 'lowsrc')
protected

◆ $attrMethod

$attrMethod
protected

◆ $tagBlacklist

$tagBlacklist
protected
Valeur initiale :
= array(
'applet',
'body',
'bgsound',
'base',
'basefont',
'embed',
'frame',
'frameset',
'head',
'html',
'id',
'iframe',
'ilayer',
'layer',
'link',
'meta',
'name',
'object',
'script',
'style',
'title',
'xml'
)

◆ $tagsArray

$tagsArray
protected

◆ $tagsMethod

$tagsMethod
protected

◆ $xssAuto

$xssAuto
protected

La documentation de cette classe a été générée à partir du fichier suivant :