mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Protect against unwanted output that may corrupt the JSON results
SVN:2.0[2608]
This commit is contained in:
@@ -117,7 +117,7 @@ try
|
||||
{
|
||||
throw new Exception("Missing parameter 'json_data", RestResult::MISSING_JSON);
|
||||
}
|
||||
$aJsonData = json_decode($sJsonString);
|
||||
$aJsonData = @json_decode($sJsonString);
|
||||
if ($aJsonData == null)
|
||||
{
|
||||
throw new Exception("Parameter json_data is not a valid JSON structure", RestResult::INVALID_JSON);
|
||||
|
||||
Reference in New Issue
Block a user