Skip to content
Snippets Groups Projects
Commit 2eedf85b authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #904 from dlobo/CRM-12718

CRM-12718
parents 3b59baf5 f3a27f08
No related branches found
No related tags found
No related merge requests found
......@@ -254,10 +254,16 @@ class CRM_Core_IDS {
$session = CRM_Core_Session::singleton();
$session->reset(2);
$msg = ts('There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting');
$path = implode('/', $args);
if ($path == in_array("civicrm/ajax/rest", "civicrm/api/json")) {
require ("api/v3/utils.php");
$error = civicrm_api3_create_error(ts('There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting'),
if (in_array(
$path,
array("civicrm/ajax/rest", "civicrm/api/json")
)) {
require_once "api/v3/utils.php";
$error = civicrm_api3_create_error(
$msg,
array(
'IP' => $_SERVER['REMOTE_ADDR'],
'error_code' => 'IDS_KICK',
......@@ -269,7 +275,7 @@ class CRM_Core_IDS {
echo json_encode($error);
CRM_Utils_System::civiExit();
}
CRM_Core_Error::fatal(ts('There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting'));
CRM_Core_Error::fatal($msg);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment