HttpInputValidator()
checkGetParams()
checkParameter()
checkPostParams()
isRegularPost()
logHackTrial()
showPosts()
$aCheck
$aPostVariables
$bLog
$sConfigPath
$sFailure
$sLogPath
$sMode
This class is the extended version of excelent code made by kummer.
version | 1.0.1 |
---|---|
see | \http://contenido.org/forum/viewtopic.php?p=113492#113492 |
HttpInputValidator(string $sConfigPath) : \HttpInputValidator
Configuration path $sConfigPath is mandatory and has to contain the complete path to configuration file with defined parameters.
The class provides two modes: training and arcade. Training mode only logs violations - if log path is given into log file otherwise as comment into HTML output. Arcade mode is made for killing - every violation will cause an hard exit!
string
checkGetParams() : bool
bool
checkParameter(string $sType, string $sKey, mixed $mValue) : bool
string
string
mixed
bool
checkPostParams()
isRegularPost(string $sKey) : mixed
string
mixed
logHackTrial()
showPosts($bReturn) : string
string
$aCheck : array
Structure has to be:
$check['GET']['param1'] = VALIDATE_FORMAT;
$check['POST']['param2'] = VALIDATE_FORMAT;
Possible formats are defined as constants in top of these class file.
$aPostVariables : array
$bLog : boolean
$sConfigPath : string
$sFailure : string
$sLogPath : string
$sMode : string