diff --git a/public/legacy/service/core/REST/SugarRestJSON.php b/public/legacy/service/core/REST/SugarRestJSON.php index 65d0974f5c..71bd7e6459 100755 --- a/public/legacy/service/core/REST/SugarRestJSON.php +++ b/public/legacy/service/core/REST/SugarRestJSON.php @@ -84,7 +84,9 @@ public function generateResponse($input){ */ public function serve(){ $GLOBALS['log']->info('Begin: SugarRestJSON->serve'); - $json_data = !empty($_REQUEST['rest_data'])? $GLOBALS['RAW_REQUEST']['rest_data']: ''; + $raw_json_data = $GLOBALS['RAW_REQUEST']['rest_data']; + $json_data = !empty($raw_json_data)? html_entity_decode($raw_json_data): ''; + if(empty($_REQUEST['method']) || !method_exists($this->implementation, $_REQUEST['method'])){ $er = new SoapError(); $er->set_error('invalid_call');