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
- Input string
- $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
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
Returns
boolean Check state
|
public static
boolean
|
#
isInteger( string $sVar )
Check: Is the variable an integer?
Check: Is the variable an integer?
Parameters
Returns
boolean Check state
|
public static
boolean
|
#
isString( string $sVar )
Check: Is the variable an string?
Check: Is the variable an string?
Parameters
Returns
boolean Check state
|
public static
boolean
|
#
toBoolean( string $sString )
Convert an string to an boolean
Convert an string to an boolean
Parameters
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
Returns
integer Type casted input string
|
public static
string
|
#
toString( string $sString, boolean $bHTML = false, string $sAllowableTags = '' )
Convert an string
Parameters
- $sString
- Input string
- $bHTML
- If true check with strip_tags and stripslashes
- $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
- Input string
- $oDB
- CONTENIDO database object
- $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
Returns
string Converted string
|
public static
string
|
#
unescapeDB( string $sString )
Un-quote string quoted with escapeDB()
Un-quote string quoted with escapeDB()
Parameters
Returns
string Converted string
|