소스 검색

Protect against unwanted output that may corrupt the JSON results

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2607 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 12 년 전
부모
커밋
ff2a086c09
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      webservices/rest.php

+ 1 - 1
webservices/rest.php

@@ -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);