Commit 6ed328a0 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Config.php: temporarely add some debug info in case of attacks

parent 7f5f3205
......@@ -96,13 +96,13 @@ class Config {
return;
}
self::attackDetectedExitNow($config);
self::attackDetectedExitNow($config, $key);
}
/**
* @throws UserFormException
*/
public static function attackDetectedExitNow(array $config = array()) {
public static function attackDetectedExitNow(array $config = array(), $getParamName = '') {
if (count($config) == 0) {
$config = self::readConfig();
......@@ -118,7 +118,15 @@ class Config {
sleep($penalty);
if ($config[SYSTEM_SECURITY_SHOW_MESSAGE] == 'true' || $config[SYSTEM_SECURITY_SHOW_MESSAGE] == 1) {
echo "Attack detected - stop process";
// $answer[API_STATUS] = API_ANSWER_STATUS_ERROR;
// $answer[API_MESSAGE] = 'Attack detected - stop process.';
// if($getParamName!='') {
// $answer[API_MESSAGE] .= " Attack parameter: $getParamName";
// }
// header("Content-Type: application/json");
// echo json_encode($answer);
}
exit;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment