XOOPS
2.6.0
|
Public Member Functions | |
__construct ($tagsArray=array(), $attrArray=array(), $tagsMethod=0, $attrMethod=0, $xssAuto=1) | |
process ($source) | |
Static Public Member Functions | |
static | clean ($source, $type= 'string') |
static | gather ($source, $input_map, $require=false) |
static | getInstance ($tagsArray=array(), $attrArray=array(), $tagsMethod=0, $attrMethod=0, $xssAuto=1) |
Protected Member Functions | |
decode ($source) | |
filterAttr ($attrSet) | |
filterTags ($source) | |
remove ($source) | |
Protected Attributes | |
$attrArray | |
$attrBlacklist = array('action', 'background', 'codebase', 'dynsrc', 'lowsrc') | |
$attrMethod | |
$tagBlacklist | |
$tagsArray | |
$tagsMethod | |
$xssAuto | |
Definition at line 37 of file FilterInput.php.
Xoops\Core\FilterInput::__construct | ( | $tagsArray = array() , |
|
$attrArray = array() , |
|||
$tagsMethod = 0 , |
|||
$attrMethod = 0 , |
|||
$xssAuto = 1 |
|||
) |
Constructor
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 |
Definition at line 63 of file FilterInput.php.
References Xoops\Core\FilterInput\$attrArray, Xoops\Core\FilterInput\$attrMethod, $i, Xoops\Core\FilterInput\$tagsArray, Xoops\Core\FilterInput\$tagsMethod, and Xoops\Core\FilterInput\$xssAuto.
|
static |
Method to be called by another php script. Processes for XSS and specified bad code.
mixed | $source | Input string/array-of-string to be 'cleaned' |
string | $type | Return/cleaning type for the variable, one of (INTEGER, FLOAT, BOOLEAN, WORD, ALNUM, CMD, BASE64, STRING, ARRAY, PATH, USERNAME, WEBURL, EMAIL, IP) |
Definition at line 167 of file FilterInput.php.
|
protected |
Try to convert to plaintext
String | $source | string to decode |
Definition at line 512 of file FilterInput.php.
Referenced by Xoops\Core\FilterInput\process().
|
protected |
Internal method to strip a tag of certain attributes
array | $attrSet | attributes |
Definition at line 434 of file FilterInput.php.
References $i.
Referenced by Xoops\Core\FilterInput\filterTags().
|
protected |
Internal method to strip a string of certain tags
String | $source | - input string to be 'cleaned' |
Definition at line 304 of file FilterInput.php.
References $i, and Xoops\Core\FilterInput\filterAttr().
Referenced by Xoops\Core\FilterInput\remove().
|
static |
gather - gather input from a source
string | $source | name of source superglobal, get, post or cookie |
array | $input_map | each element of the array is an array consisting of elements to gather and clean from source
|
mixed | $require | name of required element, or false for nothing required name. If the require name is set, values will only be returned if the key $require is set in the source array. |
Definition at line 557 of file FilterInput.php.
|
static |
Returns a reference to an input filter object, only creating it if it doesn't already exist.
This method must be invoked as: $filter = & XoopsFilterInput::getInstance();
array | $tagsArray | list of user-defined tags |
array | $attrArray | list of user-defined attributes |
int | $tagsMethod | WhiteList method = 0, BlackList method = 1 |
int | $attrMethod | WhiteList method = 0, BlackList method = 1 |
int | $xssAuto | Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1 |
Definition at line 104 of file FilterInput.php.
References Xoops\Core\FilterInput\$attrArray, Xoops\Core\FilterInput\$attrMethod, Xoops\Core\FilterInput\$tagsArray, Xoops\Core\FilterInput\$tagsMethod, and Xoops\Core\FilterInput\$xssAuto.
Referenced by Xoops\Core\Request\cleanVar().
Xoops\Core\FilterInput::process | ( | $source | ) |
Method to be called by another php script. Processes for XSS and any specified bad code.
Mixed | $source | - input string/array-of-string to be 'cleaned' |
Definition at line 135 of file FilterInput.php.
References Xoops\Core\FilterInput\decode().
|
protected |
Internal method to iteratively remove all unwanted tags and attributes
String | $source | - input string to be 'cleaned' |
Definition at line 285 of file FilterInput.php.
References Xoops\Core\FilterInput\filterTags().
|
protected |
Definition at line 40 of file FilterInput.php.
Referenced by Xoops\Core\FilterInput\__construct(), and Xoops\Core\FilterInput\getInstance().
|
protected |
Definition at line 52 of file FilterInput.php.
|
protected |
Definition at line 43 of file FilterInput.php.
Referenced by Xoops\Core\FilterInput\__construct(), and Xoops\Core\FilterInput\getInstance().
|
protected |
Definition at line 46 of file FilterInput.php.
|
protected |
Definition at line 39 of file FilterInput.php.
Referenced by Xoops\Core\FilterInput\__construct(), and Xoops\Core\FilterInput\getInstance().
|
protected |
Definition at line 42 of file FilterInput.php.
Referenced by Xoops\Core\FilterInput\__construct(), and Xoops\Core\FilterInput\getInstance().
|
protected |
Definition at line 45 of file FilterInput.php.
Referenced by Xoops\Core\FilterInput\__construct(), and Xoops\Core\FilterInput\getInstance().