Methods

Checks GET parameters only.

checkGetParams() : bool
see \cRequestValidator::checkParams()

Returns

boolTrue if every parameter is fine

Checks a single parameter.

checkParameter(string $type, string $key, mixed $value) : bool
see \cRequestValidator::checkParams()

Parameters

$type

string

GET or POST

$key

string

the key of the parameter

$value

mixed

the value of the parameter

Returns

boolTrue if the parameter is fine

Checks every given parameter.

checkParams() : bool

Parameters which aren't defined in config.http_check.php are considered to be fine

Returns

boolTrue if every parameter is fine

Checks POST parameters only.

checkPostParams() : bool
see \cRequestValidator::checkParams()

Returns

boolTrue if every parameter is fine

Returns the first bad parameter

getBadParameter() : string

Returns

stringthe key of the bad parameter

Returns the instance of this class.

getInstance() : \cRequestValidator
Static

Checks an array for validity.

checkArray(array $arr, string $type) : bool

Parameters

$arr

array

the array which has to be checked

$type

string

GET or POST

Returns

booltrue if everything is fine.

Writes a log entry containing information about the request which led to the halt of the execution

logHackTrial() 

The constructor sets up the singleton object and reads the config from 'data/config/' .

__construct() : void

CON_ENVIRONMENT . '/config.http_check.php'.

Exceptions

\cFileNotFoundException if the configuration can not be loaded

 Properties

 

$_blacklist : array

If any of these is set the request will be invalid

 

$_check : 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.

 

$_configPath : string
 

$_failure : string
 

$_log : boolean
 

$_logPath : string
 

$_mode : string
 

$_instance : \cRequestValidator

 Constants

 

Regexp for valid area values.

CHECK_AREASTRING : string
 

Regexp for valid belang values.

CHECK_BELANG : string
 

Regexp for 32 character hash.

CHECK_HASH32 : string
 

Regexp for integers.

CHECK_INTEGER : string
 

Regexp for validating file upload paths.

CHECK_PATHSTRING : string
 

Regexp for primitive strings.

CHECK_PRIMITIVESTRING : string
 

Regexp for strings.

CHECK_STRING : string