mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Merge remote-tracking branch 'origin/support/2.7' into support/3.1
# Conflicts: # core/restservices.class.inc.php # datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php # tests/php-unit-tests/unitary-tests/core/Delta/delta_test_sanitize_output.xml # tests/php-unit-tests/unitary-tests/core/RestServicesSanitizeOutputTest.php # tests/php-unit-tests/unitary-tests/core/RestServicesTest.php # webservices/rest.php
This commit is contained in:
@@ -224,14 +224,14 @@ try
|
||||
/** @var iRestServiceProvider $oRS */
|
||||
$oRS = $aOpToRestService[$sOperation]['service_provider'];
|
||||
$sProvider = get_class($oRS);
|
||||
|
||||
|
||||
if ($oRS instanceof iRestInputSanitizer) {
|
||||
$sSanitizedJsonInput = $oRS->SanitizeJsonInput($sJsonString);
|
||||
}
|
||||
else {
|
||||
$sSanitizedJsonInput = $sJsonString;
|
||||
}
|
||||
|
||||
|
||||
CMDBObject::SetTrackOrigin('webservice-rest');
|
||||
$oResult = $oRS->ExecOperation($sVersion, $sOperation, $aJsonData);
|
||||
}
|
||||
@@ -299,7 +299,7 @@ if (MetaModel::GetConfig()->Get('log_rest_service'))
|
||||
$oLog->SetTrim('message', $sMessage);
|
||||
$oLog->Set('code', $oResult->code);
|
||||
$oResult->SanitizeContent();
|
||||
$oLog->SetTrim('json_output', json_encode($oResult, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
||||
$oLog->SetTrim('json_output', json_encode($oResult, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
||||
|
||||
$oLog->DBInsertNoReload();
|
||||
}
|
||||
Reference in New Issue
Block a user