add $raw_json_data variable; clean up HTML entity decoding

This commit is contained in:
Josh McCullough 2024-10-23 15:24:22 -04:00 committed by GitHub
parent 489c1da8f2
commit e954136298
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,7 +84,9 @@ class SugarRestJSON extends SugarRest{
*/
public function serve(){
$GLOBALS['log']->info('Begin: SugarRestJSON->serve');
$json_data = html_entity_decode(!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');