Class cSecurity
This object makes CONTENIDO more secure
Methods summary
public static
boolean
|
#
checkRequests( )
Checks some CONTENIDO core related request parameters against XSS
Checks some CONTENIDO core related request parameters against XSS
Returns
boolean True on success otherwhise nothing.
|
public static
string
|
#
filter( string $sString, cDb $oDb )
Escapes string using CONTENIDO urlencoding method and escapes string for
inserting
Escapes string using CONTENIDO urlencoding method and escapes string for
inserting
Parameters
- $sString
string $sString Input string
- $oDb
cDb
$oDb CONTENIDO database object
Returns
string Filtered string
|
public static
string
|
#
unFilter( string $sString )
Reverts effect of method filter()
Reverts effect of method filter()
Parameters
- $sString
string $sString Input string
Returns
string Unfiltered string
|
public static
boolean
|
#
isBoolean( string $sVar )
Check: Has the variable an boolean value?
Check: Has the variable an boolean value?
Parameters
- $sVar
string $sVar Input string
Returns
boolean Check state
|
public static
boolean
|
#
isInteger( string $sVar )
Check: Is the variable an integer?
Check: Is the variable an integer?
Parameters
- $sVar
string $sVar Input string
Returns
boolean Check state
|
public static
boolean
|
#
isString( string $sVar )
Check: Is the variable an string?
Check: Is the variable an string?
Parameters
- $sVar
string $sVar Input string
Returns
boolean Check state
|
public static
boolean
|
#
toBoolean( string $sString )
Convert an string to an boolean
Convert an string to an boolean
Parameters
- $sString
string $sString Input string
Returns
boolean Type casted input string
|
public static
integer
|
#
toInteger( string $sString )
Convert an string to an integer
Convert an string to an integer
Parameters
- $sString
string $sString Input string
Returns
integer Type casted input string
|
public static
string
|
#
toString( string $sString, boolean $bHTML = false, string $sAllowableTags = '' )
Convert an string
Parameters
- $sString
string $sString Input string
- $bHTML
boolean $bHTML If true check with strip_tags and stripslashes
- $sAllowableTags
string $sAllowableTags Allowable tags if $bHTML is true
Returns
string Converted string
|
public static
string
|
#
escapeDB( string $sString, cDb $oDB, boolean $bUndoAddSlashes = true )
Escaped an query-string with mysql_real_escape_string
Escaped an query-string with mysql_real_escape_string
Parameters
- $sString
string $sString Input string
- $oDB
cDb
$oDB CONTENIDO database object
- $bUndoAddSlashes
boolean $bUndoAddSlashes Flag for undo addslashes (optional, default: true)
Returns
string Converted string
|
public static
string
|
#
escapeString( string $sString )
Escaped an query-string with addslashes
Escaped an query-string with addslashes
Parameters
- $sString
string $sString Input string
Returns
string Converted string
|
public static
string
|
#
unescapeDB( string $sString )
Un-quote string quoted with escapeDB()
Un-quote string quoted with escapeDB()
Parameters
- $sString
string $sString Input string
Returns
string Converted string
|